Re: PHP give me empty page
- From: "J.O. Aho" <user@xxxxxxxxxxx>
- Date: Sun, 28 May 2006 15:21:18 +0200
mtczx232@xxxxxxxxx wrote:
but I have another problam with connection MySQL page:
heare the code:
<?php
$host = "localhost";
$username = "root";
$password = "1234";
$database = "db";
echo "xxdfdfdf";
echo mysql_error();
$server = mysql_connect($host, $username, $password);
echo (mysql_error());
I try a lot, but always all echo after :"mysql_connect" ignored!
why?
The function mysql_error() will only generate a string if there have been an error while you did the mysql_connect(), if no error, then no string and then no output from the echo.
From http://www.php.net/manual/en/function.mysql-error.php
Return Values
Returns the error text from the last MySQL function,
or '' (empty string) if no error occurred.
//Aho
.
- References:
- PHP give me empty page
- From: mtczx232
- Re: PHP give me empty page
- From: mtczx232
- Re: PHP give me empty page
- From: mtczx232
- PHP give me empty page
- Prev by Date: Re: PHP give me empty page
- Next by Date: Re: PHP give me empty page
- Previous by thread: Re: PHP give me empty page
- Next by thread: Re: PHP give me empty page
- Index(es):
Relevant Pages
|