|
Posted by Jerry Stuckle on 03/20/07 04:01
Bruce A. Julseth wrote:
> "Jeff" <jeff@quixion.net> wrote in message
> news:1174344779.712020.258000@p15g2000hsd.googlegroups.com...
>> Get rid of the @ in front of the $db = new mysqli( ...
>>
>> That is suppressing any errors on that line of code. Then it should
>> show you in your browser what the error is and then we can help you
>> further.
>>
>> Also, you can include $Database as the 4th parameter in your mysqli
>> constructor to connect to that specific database.
>>
>
> Okay, I now have
>
> $Host = "localhost";
> $User = "Fred";
> $Database = "house";
> $Password = "mypw"
>
> echo "before mysqli<br />Host: " . $Host . "<br />" . $User . "<br />" .
> $Database;
>
> $db = new mysqli($Host, $User, $Password);
>
> echo "Connection is " . mysqli_connect_errno();
>
> I didn't add the database to the mysqli parameter list.
>
> I still never got to the 2nd echo statement. Firefox gives me a "done" in
> the lower left corner. The "mysqli" is the very first MySQL command I
> execute in my program. Do I need "Create" or "instantiate" something first?
> I'm running PHP 5.2.0 (re: phpinfo()) and MySQL Server 5.0 [I'm not sure
> what version. How can I find out?]
>
>
>
Add this to the beginning of your script:
error_reporting(E_ALL);
ini_set("display_errors", "1");
And see what error messages you get. Or check your PHP error log (which
may be in the Apache log).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|