need help building url encoded string query for php if that is what it is called

I am new to php
How would I send a string to a database that would have the following query
$sql = "INSERT INTO `mlog`(`student`, `password`, `mDate`, `speed`, `correct`, `wrong`, `style`, `hints`, `blank_N_words`) VALUES (\'Ben\',\'7316\',\'1/23/1967\',30,5,5,\'multichoice\',5,3)";

Open in new window

Who is Participating?
Ray PaseurConnect With a Mentor Commented:
Getting started in PHP and MySQL:

The query with the unwanted "escape" characters removed:
$sql = "INSERT INTO `mlog`(`student`, `password`, `mDate`, `speed`, `correct`, `wrong`, `style`, `hints`, `blank_N_words`) VALUES ('Ben','7316','1/23/1967',30,5,5,'multichoice',5,3)";

Open in new window

This query cannot work because the number of columns does not match the number of values.
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
Since the whole string is double-quoted, you do not need to 'escape' the single quotes.
All Courses

From novice to tech pro — start learning today.