Page 1 of 1

store directory and image name in mysql table

Posted: Sat Oct 04, 2008 1:47 pm
by kanchan

Code: Select all

<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<label>
<input type="text" name="folder_name" id="folder_name" />
</label>
<label>
<input type="file" name="image_name" id="image_name" />
</label>
<label>
<input type="submit" name="button" id="button" value="Submit" />
 </label>
</form>
now when the users submit the folder name and image then that folder name and the selected image name should be inserted into database....
whats the code for this?? any ideas??

Re: store directory and image name in mysql table

Posted: Sat Oct 04, 2008 8:49 pm
by yacahuma
http://www.php-mysql-tutorial.com/php-mysql-upload.php

I think the folder is part of the $_FILES array. not sure. if it is , just use, pathinfo to get the folder name