You should be using echo in place of print.
echo "OK 2";
>Robert Henkel
>Shouldn't you have on line 7
>print ("OK 2 ");
>and not
>print ("OK 2 ")
>Im not a PHP person but thats what I noticed in your code. And if ;
>terminates a command that can't be helping
>
>
>
>
>
>magic words sql database
>-----Original Message-----
>From: MTF [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 16, 2001 2:13 PM
>To: [EMAIL PROTECTED]
>Subject: Parse error?
>
>
>I am new to MySQL and am using Paul DuBois's book to MySQL guide me. (Great
>Book!)
>
>I am attempting to use PHP, My scripts always connect to the MySQL server
>OK,
>and the Databases to, but my queries always fail with the following
>message:
>
>OK 1 OK 2
>Parse error: parse error in /home/httpd/html/test10.php3 on line 8
>
>(I place the OK 1 etc to help me find problems)
>
>This is the PHP3 script
>
><?php
>$link = mysql_pconnect ("localhost", "test", "test")
> or die ("Could not connect");
>print ("OK 1 ");
>mysql_select_db ("samp_db")
> or die ("Could not select database");
>print ("OK 2 ")
>$query = "SELECT COUNT(*) FROM president";
>$result = mysql_query ($query)
> or die ("Query failed");
>Print ("OK 3 ")
>?>
>
>Using PHP I can create drop databases all OK but every query I've tried
>gives
>me a parse error and I've looked trough all my books and can't find any
>mention of what they are and how you fix them.
>
>Thanks
>
>Mike
>
>---------------------------------------------------------------------
>Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>---------------------------------------------------------------------
>Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php