Вопрос

I am getting this error:

Parse error: syntax error, unexpected '!=' (T_IS_NOT_EQUAL) in C:\xampp\htdocs\assurance\confirmation.php on line 131

Here is lines 131-134 of my code:

if ($_POST['password']) != ($_POST['confirm'])  { 
echo '<p class="error">Your passwords do not match.</p>';
$okay = FALSE;
}
Это было полезно?

Решение

if ($_POST['password'] != $_POST['confirm'])  { 
echo '<p class="error">Your passwords do not match.</p>';
$okay = FALSE;
}

the syntax of the if statement is

if (expr)
  statement

See http://www.php.net/manual/en/control-structures.if.php

Другие советы

use this

if ($_POST['password'] != $_POST['confirm'])  { 
    echo '<p class="error">Your passwords do not match.</p>';
    $okay = FALSE;
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top