tags:

views:

160

answers:

3
+2  A: 

Your problem here is not with mysql_real_escape_string. Your problem is with the fact that you don't have a connection to a server. Do you have a database 'periodic_table' running locally with 'username' and 'password' for your login credentials?

thetaiko
yes, I tested it out too with other code.
skyhigh
Move the `$input = filter_input_array(INPUT_POST, $filters);` line after `if(is_resource($link))`
thetaiko
Man, even phppro tutorials does not work so i guess no one on is PRO and why would people put up tutorials that does not work.
skyhigh
A: 
  1. they used function name as a parameter for the another function.
  2. Yes
Col. Shrapnel
A: 

I think mysql_real_escape_string needs a connection so it knows what charset is used.

also in php, single quotes are faster then double quotes as php doesn't have to process the contents of thr string looking for $varname etc.

steelbytes