MrRay Posted June 19, 2006 Share Posted June 19, 2006 [code]<html><body><?phprequire('top.inc');require('menu2.inc');?> <div id="main" class="hideMe"> <span class="content_header"><?php echo "$select_name" ?></span> <div class="content_box"><?phpmysql_connect('localhost', 'asdfasdf', 'asdfasdf');mysql_select_db('dbname');$sql = "SELECT item_number, year, materials, dimensions, location, cost, misc FROM items ORDER BY area, locname";$res = mysql_query($sql) or die(mysql_error());$count = 0;while (list ($i, $y, $m, $d, $l, $c, $misc) = mysql_fetch_row($res)) { echo "<div class='pic'><img src='$i'><br class='item'/>$y<br class='item'/>$m<br class='item'/>$d<br class='item'/>$l<br class='item'/>$c<br class='item'/>$misc</div>\n"; if (++$count % 4 == 0) { echo "<br class='item'/>\n"; }}echo "<br/>\n";?> </div> </div><?phprequire('content.inc');require('footer.inc');?></body></html>[/code]what is keeping this from working? Quote Link to comment https://forums.phpfreaks.com/topic/12402-i-have-trouble-w-the-whole-require-thing/ Share on other sites More sharing options...
kenrbnsn Posted June 19, 2006 Share Posted June 19, 2006 What's it suppose to do? Do you have a test URL where it can be seen in action. What is the script doing?Ken Quote Link to comment https://forums.phpfreaks.com/topic/12402-i-have-trouble-w-the-whole-require-thing/#findComment-47418 Share on other sites More sharing options...
MrRay Posted June 19, 2006 Author Share Posted June 19, 2006 the parts I am concerned about are where it has [code]<?php require('whatever.inc')?>[/code]and it won't do anything with it. i don't understand why it won't load the parts im telling it to for the page Quote Link to comment https://forums.phpfreaks.com/topic/12402-i-have-trouble-w-the-whole-require-thing/#findComment-47421 Share on other sites More sharing options...
MrRay Posted June 21, 2006 Author Share Posted June 21, 2006 i figured it out, for some reason my DOCTYPE in the file top.inc was stopping the page from being loaded, it may have been the part with the <?xml (whatever i put there) ?> tag for formatting and stuff. Im pretty sure it was that actually. Quote Link to comment https://forums.phpfreaks.com/topic/12402-i-have-trouble-w-the-whole-require-thing/#findComment-48032 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.