DEV Community

Discussion on: Expanding the Snake game to include a Global Scoreboard - Part 1

Collapse
 
chillsunfire profile image
Sunfire

I haven't started testing yet, but this is the code I've got for filtering/sanitizing the one and only user input field:

$name = trim(stripslashes(strip_tags(filter_var($_POST['name'], FILTER_SANITIZE_STRING))));

Thanks for the link - that will be helpful when I do start testing.

Now, parameterized queries - that's something I don't know about yet....