Jump to content

pic script problem


invisionx

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.