skip to Main Content

Mysql – How can I fix 'Array ( [0] => [1] => [2] => )'?

I was trying to insert values to MySQL database with following code: $pdo = new PDO('mysql:host=localhost;dbname=project;charset=utf8;, 'admin', 'password'); $stmt = $pdo->prepare('INSERT INTO userdata values(?, ?, ?, ?, ?)'); if ($stmt->execute(null, '"'.$_REQUEST['username'].'"', '"'.$_REQUEST['password'].'"', '"'.$file.'"', null)) { echo 'Inserted' } else {…

VIEW QUESTION
Back To Top
Search