|  | Posted by vinnie on 06/04/07 21:41 
it only displays the name, but the last name and the address seems notto exist! why?
 
 <?php
 @ $db=mysql_pconnect('host', 'UserID', 'PWD');
 if (!$db)
 {
 echo 'conneciton eror';
 exit;
 }
 else
 {
 echo 'connection on!';
 }
 mysql_select_db('list');
 $query="select * from index";
 $result=mysql_query($query);
 $num_results=mysql_num_rows($result);
 if ($num_results == 0)
 {
 echo'<br><br>nothing to dispaly';
 }
 else
 {
 echo'<br><br>here are the results: '.$num_results;
 }
 for ($i<0; $i<$num_results; $i++)
 {
 $row=mysql_fetch_array($result);
 echo '<br>name: ';
 echo htmlspecialchars(stripslashes($row['name']));
 echo '<br>last name: ';
 echo htmlspecialchars(stripslashes($row['last']));
 }
 ?>
  Navigation: [Reply to this message] |