Page 1 of 1

blank blank

Posted: Tue Jan 27, 2004 8:43 am
by doggy
i just get a blank result from this and there is stuff in my db and every thing works but this doesnt and i am clueless

Code: Select all

<?php
echo "<table width="150" border="0" cellpadding="0" cellspacing="0" bgcolor="#F2F2FF">"
    ."<tr>"
    ."<td width="150" height="19" valign="top" background="images/ban-1.gif"><div align="center"><b>Menu</b></div></td>"
    ."</tr><tr>"
    ."<td height="8"></td></tr><tr>"
    ."<td height="19" valign="top">";

$DB = new DB;                                                                                                                                    
                                                                                                                                                             
$DB->sql = "SELECT * FROM pages order by sOrder";                                                                                                  
$DB->result = mysql_query($DB->sql);                                                                                               
                                                                                                                                                             
while($DB->row = mysql_fetch_array($DB->result)) {                                                                      
  $id = $DB->row[id]; 
  $link = $DB->row[slink]; 

  echo "<a href="pages.php?id=$id">$link</a><br>";                                                                                                                                                             
  }               
  echo "</td>"
    ."</tr></table><br>";

?>
[/google]

Posted: Tue Jan 27, 2004 10:21 am
by ol4pr0
Maby you should add some

Code: Select all

.mysql_error());
lines into them to see if something might go wrong with the connecting!

Posted: Tue Jan 27, 2004 1:08 pm
by Gen-ik
Are you connecting to the database?

:: [php_man]mysql_connect[/php_man]
:: [php_man]mysql_select_db[/php_man]

Posted: Tue Jan 27, 2004 1:26 pm
by phpcoder

Code: Select all

<?php
$id = $DB->row['id']; 
  $link = $DB->row['slink']; 

  
?>