You are here: Re: PHP give me empty page « All PHP « IT news, forums, messages
Re: PHP give me empty page

Posted by J.O. Aho on 05/28/06 16:21

mtczx232@yahoo.com 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация