Jump to content

Form Validation


Bavilo

Recommended Posts

[!--quoteo(post=354097:date=Mar 11 2006, 10:20 PM:name=Prismatic)--][div class=\'quotetop\']QUOTE(Prismatic @ Mar 11 2006, 10:20 PM) [snapback]354097[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code]<?php
if (!is_numeric($_POST['field']){
    echo "Not a number!";
}
else{
    echo "Number!";
}
?>[/code]
[/quote]

Thanks i will try that in a bit
Link to comment
https://forums.phpfreaks.com/topic/4735-form-validation/#findComment-16586
Share on other sites

[!--quoteo(post=354107:date=Mar 12 2006, 06:51 AM:name=Bavilo)--][div class=\'quotetop\']QUOTE(Bavilo @ Mar 12 2006, 06:51 AM) [snapback]354107[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Schweeeet it works great. Thanks!
[/quote]

You can also use JScript as a validation tool before submit..
Link to comment
https://forums.phpfreaks.com/topic/4735-form-validation/#findComment-16613
Share on other sites

[!--quoteo(post=354126:date=Mar 12 2006, 02:12 AM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 12 2006, 02:12 AM) [snapback]354126[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You can also use JScript as a validation tool before submit..
[/quote]

Yes. But never rely on client side validation. If youre going to validate it on the client, you should still validate on the server side.
Link to comment
https://forums.phpfreaks.com/topic/4735-form-validation/#findComment-16621
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.