I it still don't working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
molandim
Forum Newbie
Posts: 19
Joined: Thu Feb 20, 2003 11:33 am
Location: Brazil
Contact:

I it still don't working

Post 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 :evil: :evil: :evil:
User avatar
daven
Forum Contributor
Posts: 332
Joined: Tue Dec 17, 2002 1:29 pm
Location: Gaithersburg, MD
Contact:

Post 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.
Post Reply