-6

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 value of var($name& $address).

Jasil TP
  • 1
  • 1
  • 1
  • 2

2 Answers2

3

mysqli_query is now used instead of mysql_query. You can also use PDO::query or MySQLi::query. You can see the documentation here

NoodleOfDeath
  • 14,256
  • 21
  • 74
  • 102
1

Read : The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

It basically means mysql_query() can no longer be used. You will have to switch to using PDO.

For PDO, read: http://php.net/manual/en/book.pdo.php

Community
  • 1
  • 1