I am trying to process my first online form with PHP. From my troubleshooting I beleive it is connecting to the database but is having a query problem. I am sure the fix will be quite basic as this is my first attempt at processing a form but I seem to have hit a wall.
If anybody can take a look at my php script and see if any problem sticks out, it would be greatly appreciated.
Thanks a lot. Below is my script:
1st: Don't post your username and password on the internet (I removed it for you now)
2nd: Instead of using or die('Error querying database.');, use or die(mysqli_error());. That'll give you an exact error message.
3rd: Don't ever put direct user input into your SQL strings. That leaves your site widely open to SQL injections. Call mysqli_real_escape_string() on every user defined variable you're putting into this string.