note 56525 rejected from function.mysql-pconnect by nlopess

From: Date: Tue, 06 Sep 2005 10:16:52 +0000
Subject: note 56525 rejected from function.mysql-pconnect by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-94805@lists.php.net to get a copy of this message
Note Submitter: sscrzhs at yahoo dot com ---- Why i can't connect to my MySQL database by using the following script: <html> <head> <title> PHP Test </title> </head> <body> <?php $link = @mysql_pconnect("localhost","Ping","123") or die("cannot connect to localhost".mysql_error()); mysql_select_db(test) or die("cannot connect to the database".mysql_error()); $result = mysql_query("SELECT * FROM student") or die("cannot execute the query"); print("<table>\n"); while ($row = mysql_fetch_row($result)) { print("<tr>\n"); for ($i=0;$i<mysql_num_fields($result);$i++) { printf("<TD>%s</TD>\n",htmlspecialchars($row[$i])); } print("</tr>\n"); } mysql_free_result($result); print("</table>\n"); ?> </body> </html> could anyone here help me?

« previous php.notes (#94805) next »