[Help] Text Entrys Block

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
I get better help on here so does anyone know how I can make it so that when people fill in a form they can't use characters that will cause an error? like these:
Code:
' " . / \ ] [ ) ( ; : `
This is my code for the text box:

Code:
        <span title="Name">Bot name: </span><br />
        <input type="text" name="name" /><br /><br />
 

Ecko

23:37 [autobots] -!- eckostylez [[email protected]]
Nov 25, 2012
1,398
962
either use javascript to replace the characters automatically or (since you are most likely using php to handle the form) use preg_replace() to remove those characters. even better would be to use prepared statements
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
every time a user inputs something use CTRL + F and type the characters you don't want and if you find any remove them
Is there an option for "Bad Answer"?


either use javascript to replace the characters automatically or (since you are most likely using php to handle the form) use preg_replace() to remove those characters. even better would be to use prepared statements
I figured it out I did something like that :) A friend had helped me last night and made it better

Close thread please
 

Users who are viewing this thread

Top