Hi All,
I am trying to pull info out of a table and assign a var name to each
field... I seem to be having trouble. I have tried to do $var = $row[0]
but that does not seem to do it. I have included what is working below. I
would like to have each element of the array stored in a seperate variable
for use on a web page. Thanks
JG
<?php
$stmt = 'SELECT * FROM custdata WHERE UserName like "fred"';
mysql_connect($localhost,test,testme);
$result = mysql_db_query("test",$stmt) ;
while($row = mysql_fetch_object($result)) {
//** doing this now**//
printf("%s",
$row->UserName) ;
// **Would like to do something like**//
// $user = $row[0]; //
}
mysql_free_result($result);
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]