how can i post and display the photograph using php and mysq
Moderator: General Moderators
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
how can i post and display the photograph using php and mysq
dear friends
i like to display a photograph in the my web page wich can be stored in the database can u suggest me how can i do this
i like to display a photograph in the my web page wich can be stored in the database can u suggest me how can i do this
Code: Select all
$dBHost = "*****";
$dbUser = "*****";
$dbPass = "*****";
$dbDatabase = "*****";
$db_connection = mysql_connect($dbHost, $dbUser, $dbPass) or die("Could not connect to DB");
mysql_select_db($dbDatabase, $db_connection) or die ("Could not find DB");
$result = mysql_query("SELECT img_location FROM database WHERE id='$id'");
$row = mysql_fetch_object($result);
print "<img src="".$row->img_location."">";- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
You are aware that this is not a script-writing service - if you want someone to write code for you please post in the Project Help Wanted/Volunteer Work Forum - the PHP - Code forum is for helping people who have at least attempted to do the work themselves.softsolvers wrote:Hey Man,
i know such processes , my problem is concerned to get that very coding which is needed to get this. is there any specific function used to upload the file. just get me aware with only these things and please don't beat in the bush
softsolvers
Mac
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Well said. I don't mean to stir the pot, but it looks like you are new, so I guess this is a warning.
Here's a more direct link that may help you in your quest.
http://us4.php.net/features.file-upload
Here's a more direct link that may help you in your quest.
http://us4.php.net/features.file-upload
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
how to post and display the photograph using php and mysq
hello friends
Had you forgot ,i still facing problem i had searched on net but i am not getting the proper site from where i can get the solution will u plz. help me plz send me the place from where i got help or send me the snap of the code.
Looikng for post
Softsolvers
_________________
Had you forgot ,i still facing problem i had searched on net but i am not getting the proper site from where i can get the solution will u plz. help me plz send me the place from where i got help or send me the snap of the code.
Looikng for post
Softsolvers
_________________
Code: Select all
<form enctype="multipart/form-data" action="_URL_" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
Thanks,but i am telling you my actual requirement.i am making a site,in which i need to display image,for this on one page i like to give a button browse to choose the path of image and then store the image from that path to database,and on the next page i want to see that image,which fields i should take in mysql table,i am a new for php so plz. help me