Re: Re: inserting data into database!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux