Check E-mail Submission - PHP Equivalent to $_POST or $_GET Variables?

Hi,

I’m trying to figure out the best solution for my e-mail submission box at my website here. Because of the predefined string methods in JS, namely match() and substring(), I want to do the following:

Test if the submission has a ‘@’ and a ‘.com’, ‘.net’, ‘.org’, ‘.biz’, etc. in it.

Is there an equivalent method to PHP’s $_GET or $_POST in JS to grab the data just submitted from the input field in the form with the name ‘go’?

Thanks for the help.

Hi,

What you can do is attach an onsubmit event to your form.
This means that when the user submits their data, a function is fired which validates the user’s input.
If the input meets the appropriate criteria, the function returns true and the form is submitted.
Otherwise the function, displays an error message and returns false. This will stop submission.

If this is the kind of thing your after, it’s not hard to code, so just let me know.