PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $_POST['username'] ="TEST'S"; echo "SELECT * FROM users WHERE user='{$_POST['username']}' AND password='{$_POST['password']}'"; exit; $a="'NAME'S' 'JAME'S'"; preg_replace_callback("/'(.*?'.*?)'/", function($matches) { //$args = explode(',', $matches[1]); // separate the arguments //return call_user_func_array('print_r', $args); // pass the arguments to myfunction echo str_replace("'","\'", $matches[1]). "|"; }, $a); //echo preg_replace("/'(.*?'.*?)'/e", 'str_replace("'","\'", $1)', $a);
Show:  
Copy Clear