Jump to content

how would i validate email here?


xcoderx

Recommended Posts

guys now how do i validate the email field and check if date entered is numeric?

 

$email = $_POST['email'];
      if($email =="")
    {
$error['email']='yes';
    }
    $date = $_POST['date'];
      if($date =="")
    {
$error['$date']='yes';
    }
        if(count($error) ==0)
    {

Link to comment
https://forums.phpfreaks.com/topic/207643-how-would-i-validate-email-here/
Share on other sites

ah thats true but if users somehow enters alphabets then i must stop them how would i do that? somethin in the input field?.

 

It depends.  You should really force a specific date format.  You could use a javascript date picker or maybe use 3 fields (month, day, year) and check that they are valid.

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.