Insert data into MySql table strange exception

juizpretor

New Member
I am using this code to insert some values in MySql table:\[code\]<?phpmysql_connect("localhost","root","root");mysql_select_db("bib");$id = "12";$titlu = "Joe";$query = "INSERT INTO carte SET id='$id', titlu='$titlu'";$result = mysql_query($query);// Display an appropriate messageif ($result)echo "<p>Product successfully inserted!</p>";elseecho "<p>There was a problem inserting the Book!</p>";mysql_close();?>\[/code\]After running it into browser, the following error occurs:"Apache HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience."It seems that mysql_select_db("bib") statement causes it. Database is create , also table...I am running php 5.3 and mysql 5.1 on windows xp sp 2.Please any ideas are welcomed...Thanks...
 
Back
Top