Forum Moderators: coopster

Message Too Old, No Replies

PHP redirecting

Login validation

         

cyberwarloc

10:11 pm on Apr 17, 2009 (gmt 0)

10+ Year Member




Can any one tell my I can not use

<?php

if($_POST["user"]=="userName"&&$_POST["pass"]=="passWord") {

header("Location : http://example.com/validLgoin.html);
}
else {

header("Location :http://example.com/invalidLogin.html");
}

?>

When I execute the script from Mozilla Firefox 3, it will just bring up a blank white screen.

punisa

12:10 pm on Apr 18, 2009 (gmt 0)

10+ Year Member



at the beginning in: header("Location : http://example.com/validLgoin.html);

you are missing an " after the .html

cyberwarloc

3:43 pm on Apr 18, 2009 (gmt 0)

10+ Year Member



Yeah, it helps if a close all my open quotations. Another problem is, I forgot that you could not html in the same file as that type of script. Thanks for your help.