Error querying database in PHP, MySQL
Posted
by user296516
on Stack Overflow
See other posts from Stack Overflow
or by user296516
Published on 2010-04-02T12:54:18Z
Indexed on
2010/04/02
13:03 UTC
Read the original article
Hit count: 377
Hi guys, I have this code in PHP. It connects to the DB fine, but pops an error, when tryinto to insert the info.
$dbc = mysqli_connect('localhost', 'root', 'marina', 'aliendatabase') or die('Error connecting to MySQL server.');
$query = "INSERT INTO aliens_abduction (name, email) VALUSE ('John', '[email protected]')";
$result = mysqli_query($dbc, $query) or die('Error querying database.');
mysqli_close($dbc);
Here's a screenshot: http://img532.imageshack.us/img532/2930/63306356.jpg
Thanks, R
© Stack Overflow or respective owner