Jump to content

array declarations that contain text character variables or values without quotations


OmeGa3

Recommended Posts

Hello , i have create a fonction wich check via a "class validate" if the email & password are well formated

i didnt include the validate class & the code here is not full

 

the main problem is i have this error

 

 

 

Error: There are 2 array declarations that contain text character variables or values without quotations:

array( $_POST['email'], $_POST['email'] ) );

array( $_POST['password'], $_POST['password'] ) );

 

{
   $validEmail = new ValidateEmail( array( $_POST['email'], $_POST['email'] ) );
   $validpass = new ValidatePassword( array( $_POST['password'], $_POST['password'] ) );
   if ( $validEmail->isValid( ) && $validpass->isValid( ) )

 

i have tried with "" but it not work

    $validEmail = new ValidateEmail( array( $_POST["email"], $_POST["email"] ) );
   $validpass = new ValidatePassword( array( $_POST["password"], $_POST["password"] ) );
   if ( $validEmail->isValid( ) && $validpass->isValid( ) )

 

could you help me to correct the syntax please ?

 

thx you

Link to comment
Share on other sites

Guest
This topic is now 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.