Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Giving uploaded picture a new name

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Giving uploaded picture a new name

Postby pugs421 » Thu Jul 03, 2003 9:57 am

*newbie*
The script I'm trying to customize has a textbox that allows you to type in the title that the uploaded picture will be named. I removed that and tried to set it up where the picture is assigned the name of the user that uploaded it, and image name is stored in the database. I realized the this is not a good method because some people put spaces in thier username and their picture isn't displayed in that case.

*How do I get php to generate a unique name for the newly uploaded image?*

(a general idea of where the code would be placed would be very helpful as well) Thanks
pugs421
New php-forum User
New php-forum User
 
Posts: 31
Joined: Sat Jun 28, 2003 9:09 pm

Postby liquedus » Thu Jul 03, 2003 11:55 am

well if you have some other field in your database that is unique then you could use that... :)
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

Postby Redcircle » Thu Jul 03, 2003 1:14 pm

How about the user_id??
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Postby pugs421 » Thu Jul 03, 2003 2:31 pm

Repeat
*newbie*


Understood, thanks ;)
pugs421
New php-forum User
New php-forum User
 
Posts: 31
Joined: Sat Jun 28, 2003 9:09 pm


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron