A
^AndreA^
hello guys,
I've got a curiosity...
If I want to do a form with plain HTML and a scripting server-side
(such as php) I'd write something like this:
<form name="input" action="plain_html_form.php" method="post" >
Username:
<input type="text" name="user"> <br />
Email:
<input type="text" name="email"> <br />
<input type="submit" value="Submit"> <br />
</form>
and then from php I'll get the parameters as $_POST['user'] and
$_POST['email'] and that's alright...
BUT, if instead, I want to check the parameters before to send them to
the server, as I usually I do, I would use javascript...
With javascript I usually check if the fields are filled up correctly
and then I let javascript send them to the server, so I don't use the
form tag becuase I don't need it.
Is this method wrong?
Are there any downside I don't know?
thank you in advance,
Andrea
I've got a curiosity...
If I want to do a form with plain HTML and a scripting server-side
(such as php) I'd write something like this:
<form name="input" action="plain_html_form.php" method="post" >
Username:
<input type="text" name="user"> <br />
Email:
<input type="text" name="email"> <br />
<input type="submit" value="Submit"> <br />
</form>
and then from php I'll get the parameters as $_POST['user'] and
$_POST['email'] and that's alright...
BUT, if instead, I want to check the parameters before to send them to
the server, as I usually I do, I would use javascript...
With javascript I usually check if the fields are filled up correctly
and then I let javascript send them to the server, so I don't use the
form tag becuase I don't need it.
Is this method wrong?
Are there any downside I don't know?
thank you in advance,
Andrea