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> Quote Link to comment 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); Quote Link to comment 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!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.