store directory and image name in mysql table

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kanchan
Forum Commoner
Posts: 80
Joined: Tue Nov 30, 2004 12:03 pm

store directory and image name in mysql table

Post 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??
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: store directory and image name in mysql table

Post 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
Post Reply