-5

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
  • 11
  • 1
  • 1
  • 2

2 Answers2

4

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

rolling_codes
  • 15,174
  • 22
  • 76
  • 112
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