PHP variables don’t evaluate in the query [duplicate]

This happens when your result is not a result (but a “false” instead). You should change this line to this: because the ” can interprete $variables while ‘ cannot. Works fine with integers (numbers), for strings you need to put the $variable in single quotes, like If you want / have to work with single … Read more

Deprecated: mysql_query() [duplicate]

i just update my server. it showing an error today Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the >future: use mysqli or PDO instead in C:\wamp\www\work\db\dbfields – Copy.php on line 33 my dbfields – Copy.php page is mysql_query(“insert into user(name,address) values(‘$name’,’$address’)”); i create 2 columns (name&address), need to insert the … Read more

Warning: mysqli_query() expects at least 2 parameters, 1 given. What? [duplicate]

I made a PHP page that is supposed to select two names from a database and displays them. It just says: Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/tdoylex1/public_html/dorkhub/index.php on line 4 Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/tdoylex1/public_html/dorkhub/index.php on line 8 My code is:

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)