Re: Re: inserting data into database!
| From: | dpgirago at mdanderson dot org | Date: | Fri, 14 May 2004 20:04:09 +0000 |
| Subject: | Re: Re: inserting data into database! | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-34437@lists.php.net to get a copy of this message | ||
> Here is my code now, but I am getting a parsing error
> Parse error: parse error, unexpected $end
> $db_table = 'log';
> $conn = mysql_connect($db_host,$db_user,$db_pass);
> if ($conn == true) {
> $insert = "INSERT INTO $db_table SET ";
> $insert .= "Base = '" . $row->Base . "', ";
> $insert .= "Date_and_Time = '" . $row->Date_and_Time . "', ";
> $insert .= "Event_Type = '" . $row->Event_Type . "', ";
> $insert .= "Description = '" . $row->Description . "', ";
> $insert .= "Initials = '" . $row->Initials . "'";
> mysql_query($insert, $conn);
?>
If this is the actual code, you are missing a closing brace at the end of
the block.
dave