invisionx Posted April 7, 2007 Share Posted April 7, 2007 Alright i got this picture script ok and both upload and preupload script works but when i try pulling up the member picture script to see the picture uploaded it doesnt show anything and im not sure why not i mean i dont get any errors and the everything is scripted right but not sure why its not sure why its not working... here is the script <?php $user_name = $_GET['user_name']; ?> <div align="center"> <fieldset> <legend><strong><span class="txt2"><font class="txt"><b><?php echo $user_name; ?></b>'s PICTURE</font></span></strong></legend><br><br> <center><font class="txt"><a href="#" onClick="history.go(-1)">BACK</a></font></center> <br><br> <?php $sql = "SELECT pic FROM users WHERE user_name = '$user_name'"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $pic = $row['pic']; ?> <img src="../images/pic/<?php echo $pic; ?>" border="1"> <?php } ?> <br><br> <center><font class="txt"><a href="#" onClick="history.go(-1)">BACK</a></font></center> <br><br> </fieldset> </div> thank you invisionx Link to comment https://forums.phpfreaks.com/topic/45977-pic-script-problem/ Share on other sites More sharing options...
per1os Posted April 7, 2007 Share Posted April 7, 2007 Are you sure you are pointing it to the right path, try the absolute path not the relative. I take it that $pic is the variable of the picture located and you are not storing the actual picture in the DB. Link to comment https://forums.phpfreaks.com/topic/45977-pic-script-problem/#findComment-223422 Share on other sites More sharing options...
invisionx Posted April 7, 2007 Author Share Posted April 7, 2007 in the database under pic will be like the name of the pic which will be liek 1.gif and then in images/pic/ will be 2 pictures one will be 1.gif and the other will be tb_1.gif and see on after you upload it and then go back to the preloader to upload over it you will see the picture there as well so you know its there and if you want to put a new one on there but for some reason the member_picture.php isnt working correct but on preloader it is.. see its not even displaying the user_name its acting like its not connect to the database but yet not giving out any errors and im still trying to figure out why Link to comment https://forums.phpfreaks.com/topic/45977-pic-script-problem/#findComment-223426 Share on other sites More sharing options...
frosty1433 Posted April 7, 2007 Share Posted April 7, 2007 I don't understand, sorry... I think I can help, but please help me understand. Link to comment https://forums.phpfreaks.com/topic/45977-pic-script-problem/#findComment-223446 Share on other sites More sharing options...
neel_basu Posted April 7, 2007 Share Posted April 7, 2007 First Insert this line at the top of your page error_reporting(E_ALL); and tell this php file is in which folder(name). It will be best if you can show the directory tree. as I think ../images/pic/ is wrong. and try ../../images/pic/ or images/pic/ or something like that as I dont know where the images folder is. Link to comment https://forums.phpfreaks.com/topic/45977-pic-script-problem/#findComment-223476 Share on other sites More sharing options...
invisionx Posted April 7, 2007 Author Share Posted April 7, 2007 i got it working not sure really what was wrong lol i just reinserted the script again and then it started working :S lol but thanx for the help guys Link to comment https://forums.phpfreaks.com/topic/45977-pic-script-problem/#findComment-223809 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.