You forgot to select the database that you want to
insert.
Ex:
$db = mysql_select_db ( mydatabase );
Hope this helps,
Harry
--- "Denis L. Menezes" <[EMAIL PROTECTED]>
wrote:
> Hello friends,
>
> can someone tell me what is wrong with this code :
>
>
>
>
>
>
>
>
>
>
of your script is "thisscript.php".
-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 10:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Please help with code
Hello fri
On Monday, April 1, 2002, at 11:08 AM, Denis L. Menezes wrote:
> $query="INSERT INTO news (newsid,title, author, body, posted)
> VALUES($newsid,$title, $author, $body, UNIX_TIMESTAMP())";
> IF (mysql_query($query)){
> print "Row added to table";
> } else {
> print "error adding r
Should I change the position of the php code?
Thanks
denis
- Original Message -
From: "Andrew Brampton" <[EMAIL PROTECTED]>
To: "Denis L. Menezes" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, April 02, 2002 12:31 AM
Subject: Re: [PHP]
nis L. Menezes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 5:08 PM
Subject: [PHP] Please help with code
> Hello friends,
>
> can someone tell
Hello friends,
can someone tell me what is wrong with this code :
It gives the link ID. But then gives "error adding row"
Thanks in advance
Denis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:
6 matches
Mail list logo