PHP MySQL Insert Help

Posted by user364333 on Stack Overflow See other posts from Stack Overflow or by user364333
Published on 2010-06-17T09:26:00Z Indexed on 2010/06/17 9:33 UTC
Read the original article Hit count: 164

Filed under:
|
|

Hey I am trying to make a page that inserts some strings into a MySQL table but it just dosn't seem to be working for me. Here is the code I am using at the moment.

<?php
mysql_connect($address, $username, $password);
@mysql_select_db($database) or die("Unable to select database");
$query = "insert INTO user (movieid, moviename)('" . $id . "','" . $name . "') or die(mysql_error())"; 
mysql_query($query);
mysql_close();
?>

Where am i going wrong?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql