This should be simple. I’ve read 10 different tutorials online of how to do it, but I can’t.
I created a simple html test form and a php file for processing the info. I can connect to MySQL, and I can connect to a database. But when I try to insert my data into a table (which already exists), it just won’t go. The mysql section of the phpadmin tells me there are zero rows in the table.
I think the way to insert the data is something like
[php]$query = “INSERT INTO monkey
VALUES (’$username’, ‘$password’)”;
mysql_query($query) or die(‘Error, query failed’);[/php]
where monkey is the name of my table. I know that $username and $password are correctly defined, because I lopped off part of the code and just echoed these back to myself. I did similar things with the mysql connection and database location. But the darn tables are causing me to pull my hair out! I’ve tried using apostrophes and quotes and the little ` thingy in different places and I can’t get anything to work. I’ll post the rest of the code if people want it. Thanks all.