I try to make e eval code, but something went wrong, and i cannot find the error.
I’ve got this:
Parse error: syntax error, unexpected ‘,’ in /Applications/XAMPP/xamppfiles/htdocs/classes/databasehandler.php(57) : eval()’d code on line 1
Here is the code:
eval("$s->bind_param('".$binds."', ".$values.");");
$BINDS ARE: ss
$VALUES ARE: 'testing','hej123'
Double quotes are parsed by PHP, so
eval("$s->bind_param...");is equal toeval($s."->bind_param...');. Replace double with single quotes and your EVIL code will work.If you’re sure your values are delimited by comma’s why not create the array yourself?
Or something like that?