lukep11a Posted January 20, 2011 Share Posted January 20, 2011 I've got this code that worked on a blank php page but then I copied it to my page and when I preview it nothing is displayed on the page! Can anyone help... Thanks in advance. <div id="main_content_one"> <?php include 'config.php'; include 'opendb.php'; $var = 'Text'; $query = "SELECT * FROM table WHERE row LIKE \"%$var%\""; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { echo "{$row['name']} <br>"; ?> <a href="javascript:;" onclick="document.getElementById('<?php echo $row['id']; ?>').style.display='block'; window.open('http://<?php echo $row['link']; ?>');"><img src="../../graphics/Click here.png" border="0" /></a><br \> <div id="<?php echo $row['id']; ?>" style="display:none;"> <?php echo $row['surname']; ?> </div> <?php echo "{$row['date']} <br>"; } include 'closedb.php'; ?> </div> Link to comment https://forums.phpfreaks.com/topic/225114-nothing-displaying-on-page/ Share on other sites More sharing options...
TOA Posted January 20, 2011 Share Posted January 20, 2011 Put this in and tell us what it says ini_set ("display_errors", "1"); error_reporting(E_ALL); Link to comment https://forums.phpfreaks.com/topic/225114-nothing-displaying-on-page/#findComment-1162697 Share on other sites More sharing options...
lukep11a Posted January 20, 2011 Author Share Posted January 20, 2011 Thanks mate, I've sorted it now thanks to that useful bit of code, it has been driving me mad, I had config.php opendb.php and closdb.php in the wrong folder!!! Link to comment https://forums.phpfreaks.com/topic/225114-nothing-displaying-on-page/#findComment-1162714 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.