Jaswinder Posted May 27, 2013 Share Posted May 27, 2013 <div style="width:100%; height:auto; background-color:#000; color:#FFF; text-align:center;"> <table align="center" width="100%" border="1" style="color:#FFF;"> <tr><th>Pdf</th><th>Video</th><th>Images</th></tr><?php$email=$_GET['email'];include_once ('host.php');$c="select * from upload where email_id=$email";$sq=mysql_query($c) or die(mysql_error());$r=mysql_num_rows($sq);if($r>=0){ while($f=mysql_fetch_array($sq)); {?> <tr><td><? echo $f['pdf']; ?></td><td><? echo $f['video']; ?></td><td><? echo $f['images']; ?></td></tr> <?php }}else { echo "You do not uploaded anything yet"; } ?><tr><td colspan="3" style="background-color:#F00;"><a href="upload.php">Back</a></td></tr></table></div> error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@s.com' at line 1 Pdf Video Images Where email id is a@s.com Link to comment https://forums.phpfreaks.com/topic/278419-show-uploaded-files-name-from-database/ Share on other sites More sharing options...
DaveyK Posted May 27, 2013 Share Posted May 27, 2013 and you expect anyone to know what you need? Link to comment https://forums.phpfreaks.com/topic/278419-show-uploaded-files-name-from-database/#findComment-1432467 Share on other sites More sharing options...
Jaswinder Posted May 27, 2013 Author Share Posted May 27, 2013 i want to make it work as person with same email id.. whatever he uploaded either images/pdf or videos... it should display those all of same paerson Link to comment https://forums.phpfreaks.com/topic/278419-show-uploaded-files-name-from-database/#findComment-1432484 Share on other sites More sharing options...
Love2c0de Posted May 27, 2013 Share Posted May 27, 2013 In that case, I would create another table where you insert the images by whichever user, but you also insert a unique id of that user at the same time. This will allow you to select only the images with that certain id. Kind regards, L2c. Link to comment https://forums.phpfreaks.com/topic/278419-show-uploaded-files-name-from-database/#findComment-1432485 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.