Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Two questions seem hard, probably easy
Old 01-25-2008, 12:53 PM Two questions seem hard, probably easy
andyp's Avatar
Extreme Talker

Posts: 165
Name: andy patterson
Trades: 0
Does anyone know how to make an image upload script to Mysql database that renames the image to the same ID as it is in the DB my ID column is auto-incremented.

I also want to make a drop down category box and a drop down subcategory box that when the selection of category is for example php the subcategory values change to subcategories of php.

I All want This Made Using PHP & MySQLwuth as little javascript as possible
andyp is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-25-2008, 05:17 PM Re: Two questions seem hard, probably easy
Novice Talker

Posts: 5
Trades: 0
First one is easy:


http://us2.php.net/manual/en/functio...-insert-id.php
http://us3.php.net/rename

<?php
$id = mysql_insert_id();
$filename = $id.'.jpg';
rename("/path/to/file/old.jpg", "/path/to/file/".$filename);
?>

Your second question is probably going to require some JavaScript if you want to do on the fly.
shaftian is offline
Reply With Quote
View Public Profile
 
Old 01-25-2008, 06:24 PM Re: Two questions seem hard, probably easy
andyp's Avatar
Extreme Talker

Posts: 165
Name: andy patterson
Trades: 0
i thought the second question could need that
andyp is offline
Reply With Quote
View Public Profile
 
Old 01-28-2008, 02:57 AM Re: Two questions seem hard, probably easy
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
There are different solutions for the second task. You can either load all categories with all subcategories into a javascript array and then use an appropriate array of sibcategories for selected category or you can make ajax requests to server to obtain subcategories list when the category is selected. Anyway the amount of javascript coding will be sufficient in each case.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to Two questions seem hard, probably easy
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.74152 seconds with 12 queries