PHP code submitting to MySQL isn't working

surfer

New Member
I have been tying to figure out what is wrong for a long time, but I cannot figure it out. I have been trying to connect to a local MySQL database. When I run this, no error is thrown. Also, I know that the database and the table exist, and I know that my username and password are correct. \[code\]<?php // Connects to your Database $con = mysqli_connect("localhost", "**MY_USERNAME**", "**MY_PASSWORD**", "gamesite_data") or die(mysql_error()); $username = $_POST["username"];$password = $_POST["password"];$first_name = $_POST["first_name"];$last_name = $_POST["last_name"];$age = $_POST["age"];mysqli_query($con, "INSERT INTO information (`username`, `password`, `first_name`, `last_name`, `age`) VALUES ($username, $password, $firstname, $last_name, $age);");?> <?phpmysqli_close($con)?>\[/code\]
 
Top