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!
Alright like i said i made a login script. but i want to use that login on a different page like say my index.php page alright well when i add it to the codes i use
<?
// See if they're logging in, if they are, direct to login page //
<? if($action == "login") {
header ("Location: loginpage.php?op=login"); }
?>
<form action="<? echo $PHP_SELF; ?>" method="post">
<input type="hidden" name="action" value="login">
// login form fields here //
<input type="submit" value="Login">
</form>
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/smackie/public_html/smackie/index.33.php:9)
in /home/smackie/public_html/smackie/index.33.php on line 164
For some reason my php login code session start(); dont like to leave its little spot on line 2 anyone have an idea why it does that?? please help
What do you mean i got text outputs before the php tags start?
see my test index page is html but i want to add my login page which is php..
so i named my test index page index33.php so that i could add my php login script there but how would i make it where it would work or whatever?
u must have all header information put before any HTML or text is printed to the browser. In addition, if the page you're adding this script into has a session_start() you'll probably see that error. You only need one session start per page.
Part it works but yet it still wont take me to the place i want it to take me to it still stays there just gives me a
index33.php?username=username&password=userpassword
how am i going to makie it go to where i want it to go???