- You forgot a semicolon after your definition of
$name
(turn on error reporting to see parse errors). - You didn’t delimit the name inside your SQL query.
echo $result
doesn’t do anything useful.- Time to read a peer-reviewed PHP book!
More Related Contents:
- How to execute raw queries with Laravel 5.1?
- MySQL skipping first row
- Gather column name of a table from database [closed]
- I am seeing this error on submitting form Error: query was empty [closed]
- Getting raw SQL query string from PDO prepared statements
- Automated or regular backup of mysql data
- Correct way to use LIKE ‘%{$var}%’ with prepared statements?
- Show values from a MySQL database table inside a HTML table on a webpage [duplicate]
- MySQL Prepared statements with a variable size variable list
- How can I store and retrieve images from a MySQL database using PHP?
- PDO mysql: How to know if insert was successful
- How to successfully rewrite old mysql-php code with deprecated mysql_* functions?
- Mechanisms for tracking DB schema changes [closed]
- Fetching single row, single column with PDO
- SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax — PHP — PDO [duplicate]
- Doing a while / loop to get 10 random results
- IP address storing in MySQL database using PHP [duplicate]
- PHP – Import CSV file to mysql database Using LOAD DATA INFILE
- Using LIKE in bindParam for a MySQL PDO Query [duplicate]
- Simple PHP SQL login troubleshooting
- Change date format (in DB or output) to dd/mm/yyyy – PHP MySQL
- MySql PHP select count of distinct values from comma separated data (tags)
- Laravel Eloquent get results grouped by days
- mysqli – fetch_Array error call to a member function fetch_array() on a non-object mysqli [duplicate]
- looping a SQL insert statement with dates
- Auto Increment skipping numbers?
- SELECT row by DATEPART()
- UNION syntax in Cakephp
- How do i search from serialize field in mysql database?
- How to get last inserted id from table MySQL [duplicate]