darbok 1 Posted February 27, 2017 Report Share Posted February 27, 2017 <?php $con = mysqli_connect("localhost","mark","library","markdb"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql = "INSERT INTO UserNames (FirstName, LastName) VALUES ('John', 'Doe')"; if ($conn->query($sql) === TRUE) { echo "New record created successfully"; } else { echo "Error: " . $sql . "<br>" . $conn->error; } $conn->close(); ?> i have my table set to varchar (16) Quote Link to post Share on other sites
thescientist 231 Posted February 27, 2017 Report Share Posted February 27, 2017 what's your question? Quote Link to post Share on other sites
darbok 1 Posted February 28, 2017 Author Report Share Posted February 28, 2017 I feel stupid, I can't figure out why i kept getting the error message "is currently unable to handle this request." Quote Link to post Share on other sites
justsomeguy 1,135 Posted February 28, 2017 Report Share Posted February 28, 2017 Add this to the top of your code and see if it gives a better error message: ini_set('display_errors', 1); error_reporting(E_ALL); Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.