|
Posted by Schraalhans Keukenmeester on 05/19/07 09:05
At Sat, 19 May 2007 07:19:18 +0000, Robertu let his monkeys type:
> "Erwin Moller"
> WROTE:
>
>> Hi Robertu,
>>
>>> $connection = mysql_connect("12.34.5.67.89", "Sql111111","hELLOWORLD");
>>
>> mysql_connect returns a value.
>> Check at www.php.net for details.
>>
>> In this case FALSE is returned if the mysql_connect fails.
>> So you'll end up with something like this:
>> $connection = @mysql_connect("12.34.5.67.89", "Sql111111","hELLOWORLD");
>> if ($connection === FALSE){
>> echo "problem connecting...";
>> exit;
>> }
>
> Hi Erwin and tank you very much
> NOW I wrote
> $connection = @mysql_connect("12.34.5.67.89", "Sql111111","hELLOWORLD");
> if ($connection === FALSE)
> {
> header("www.pippo.es/");
> exit();
> }
>
> can it work?
>
Use header('Location:http://www.pippo.es');
And make sure there is NO output by your script before sending the
custom header, as that will cause a header to be already sent.
HTH
Sh.
[Back to original message]
|