Hi folks, I have this site and idea
http://www.helraizer.co.uk/mychatbox/
at the moment I'm using javascript to alert the user if they haven't entered a username or message but all this does is popup an alert message and return false. However, if their browser does not support javascript (javascript is turned off) then it just won't send and will give them no reason why.
How would I get it so that, using php, if the submit button is pressed and either the username is less than 3 characters and/or the comment field is less than 5 characters then above the image (on the site page) a list of errors would appear.
So if nothing was wrong it shows no errors but if the user name was less than 3 characters and comment <5 it'd appear
"Error!
-Your username is too short, please enter a user name between 3 and 10 characters.
-Your comment is too short, please enter a comment between 5 and 75 characters." (or similar)
How would I do this?
I know this is a "help" forum not a "do it for me forum" but if you guys can give me a baseline for this problem, to work with from there I can probably get it from there. =)
Thanks,
Sam