0

I'm trying to make a simple login page with MySQL but been having problem linking. I'm using xampp and eclipse as my php development tool. My database name is 'arc' with the table 'login'.

Script: enter image description here

Error: enter image description here

Am I missing something?

David
  • 51
  • 1
  • 6

1 Answers1

1

According to php docs mysql_real_escape_string extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0.

You should check mysqli instead.

yogurt
  • 380
  • 1
  • 10
Fawaz
  • 3,404
  • 3
  • 17
  • 22
  • Oh I see. Is there a way to go around it? or the new extension perhaps? I've read about using 'mysqli', but i'm not really familiar about it. I'm kinda new in this development. – David Aug 27 '17 at 18:54
  • @David The latest is the PDO stack which has many more options. But the thing you are trying to do is available in mysqli. Check the updated answer. – Fawaz Aug 27 '17 at 19:12
  • @David You literally replace `mysql` with `mysqli` in each function name - it can be done with a single search and replace. Although I'd recommend PDO over MySQLi myself because it makes it easier to switch away from MySQL if necessary. – Matthew Daly Aug 27 '17 at 19:15