loop?
| From: | Jas | Date: | Fri, 24 May 2002 15:30:16 +0000 |
| Subject: | loop? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19423@lists.php.net to get a copy of this message | ||
Not quite sure how to get this piece of code to loop through the records and
echo them back one line per one record...
<?php
session_start();
if (isset($HTTP_SESSION_VARS['var01']) ||
isset($HTTP_SESSION_VARS['$var02']) || isset($HTTP_SESSION_VARS['$var03']))
{
require '/path/to/connection/script/db_access.php';
$table = "checking";
$record = @mysql_query("SELECT * FROM $table",$dbh);
while ($row = mysql_fetch_array($record)) {
$user_id = $row['user_id'];
$f_name = $row['f_name'];
$l_name = $row['l_name'];
$email_addy = $row['email_addy'];
$un = $row['un'];
$pw = $row['pw']; }
} else {
header ("Location: index.php");
}
?>
Echo record set...
<?php echo $user_id[2]; ?>
Any help would be great!
thanks
Jas