Jump to content

Website address form validation


PRodgers4284

Recommended Posts

Im looking to add some validation to a register form for a website address, i have validation for an email adress and i was wondering if i could modifiy it to validate a website address.

 

the code i have the email validation is:

 

else if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email)){

$error_stat = 1;

//Set the message to tell the user to enter a valid email address

$email_message = '*Invalid Email Address*';

}

 

Thanks phil

Link to comment
https://forums.phpfreaks.com/topic/90962-website-address-form-validation/
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.