Hi
Does someone knows if this is possible?
I have an UPLOAD images page that works well and it saves the files correctly.
Those images have to be linked in certain way with a database so what I did is to create a field called images with the link of the folder where the image are.
When I upload the image I put a hidden field with the url so it will be inserted in that field.
Like this:
<form enctype="multipart/form-data" action="add.php?&ID=<? echo "$ID"; ?>" method="post">
//upload.php
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Select image:
<input name="userfile" type="file" />
<input name="PhotoFile" type="hidden" value="http://localhost/mysite/images/<? echo "$userfile"; ?>" >
<input type="submit" value="Upload" />
</form>
//add.php
$updating=mysql_query("UPDATE mydb
SET images='$images' WHERE ID='$ID'" );
My question is how can I add the name of the image at the end of the url (because the way I´m doing it is not working) and if there is a way to change the name of that image for a particular name.
For example 0001.jpg , 0002.jpg etc
Hope I've explained well
Any of your input is greatly appreciated.
Thanxs