Re: help with script!!!
| From: | Hugh Danaher | Date: | Sun, 02 Feb 2003 07:35:59 +0000 |
| Subject: | Re: help with script!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133972@lists.php.net to get a copy of this message | ||
echo("| %s | %s | %s | %s | %s |<br />", $array[id], $array[username],
$array[password], $array[status], $array[notes]);
try
echo "| %s | %s | %s | %s | %s |<br />".$array[id]."
".$array[username]."
".$array[password]." ".$array[status]." ".$array[notes];
dots not comas between variables.
Hope this helps.
Hugh
----- Original Message -----
From: "Karl James" <karl.james@verizon.net>
To: "php" <php-general@lists.php.net>
Sent: Friday, January 31, 2003 10:37 PM
Subject: [PHP] help with script!!!
Hello guys and gals!!!
can you tell me why i can't get this script to print my
table....
thanks Karl
please check out the code below
obviously i left my username and passwords blank :-)
----------------------------------------------------------------------------
-
--------------------------------------------------------
<?
$sqlhost = "localhost";
$sqllogin = "login";
$sqlpw = "password";
$sqldb = "database table name";
(@!mysql_pconnect($sql[localhost], $sql[wedbd13], $sql[webdb13])) {
die(mysql_error()); }
(@!mysql_select_db($sql[wedbd13])) { die(mysql_error()); }
$result = mysql_query("SELECT * FROM
assignment_one");
while($array = mysql_fetch_array($result)) {
echo("| %s | %s | %s | %s | %s |<br />", $array[id], $array[username],
$array[password], $array[status], $array[notes]);
}
?>
----------------------------------------------------------------------------
---------------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php