Page 1 of 1
I it still don't working
Posted: Wed Feb 26, 2003 2:30 pm
by molandim
Code: Select all
<?php
$login = 'marcelo';
$senha = 'olandim';
if ($_POST['name']==$login & $_POST['password']==$senha){
SESSION_start();
$_SESSION['validate'] = 1;
header ("location: http://tange.com.br/alvo.php");
exit
} else {
header ("location: http://tange.com.br/denovo.html");
exit
}
?>
Its say that: Parse error: parse error in /home/httpd/htdocs/tangecbr/check.php on line 15

Posted: Wed Feb 26, 2003 2:39 pm
by daven
Please don't multi-post. Keep things in the same thread.
Code: Select all
<?php
$login = 'marcelo';
$senha = 'olandim';
// use &&, not &
if ($_POST['name']==$login && $_POST['password']==$senha){
// session_start(), not SESSION_start()
session_start();
$_SESSION['validate'] = 1;
header ("location: http://tange.com.br/alvo.php");
exit; // put a semi-colon ';' at the end of every command
} else {
header ("location: http://tange.com.br/denovo.html");
exit; // put a semi-colon ';' at the end of every command
}
?>
A Parse Error means you are missing something that PHP considers vital. Usually it is a semi-colon (;) or a brace ({}) that you forgot.