I'm still having problems inserting records into the database table. I can do the command listed below on the command line in mysql monitor;
insert into person(name, age, sex) values("JAMES BROWN", 6, 'M')
However, I can't seem toget it to work under PHP. What is the proper syntax to get it to work in PHP? I hae created a form and would like to input to be inserted into the table.
Here's what I have;
<?php
$conn=mysql_connect("localhost","mkt2000","chelsea7"
mysql_select_db("mylogin",$conn);
$addrec="INSERT INTO logins (userID,passID,nickname) VALUES ('','$userID','passID','nickname')";
if (mysql_query($addrec, $conn)){
echo "entry successful!";
} else{
echo "entry unsuccessful. Contact the Webmaster";
}
?>
I'm really stuck on this one. Any assistance would be helpful.
Thanks
Kyle
insert into person(name, age, sex) values("JAMES BROWN", 6, 'M')
However, I can't seem toget it to work under PHP. What is the proper syntax to get it to work in PHP? I hae created a form and would like to input to be inserted into the table.
Here's what I have;
<?php
$conn=mysql_connect("localhost","mkt2000","chelsea7"
mysql_select_db("mylogin",$conn);
$addrec="INSERT INTO logins (userID,passID,nickname) VALUES ('','$userID','passID','nickname')";
if (mysql_query($addrec, $conn)){
echo "entry successful!";
} else{
echo "entry unsuccessful. Contact the Webmaster";
}
?>
I'm really stuck on this one. Any assistance would be helpful.
Thanks
Kyle