PDA

View Full Version : Login Help



additional
25-02-2007, 03:43 PM
Hey,

I am in need a little bit of help. I am trying to set up a techtuts usersystem. I use the following code to put the username and login form fields into my members iframe.


<?
include("login.php");
?>

This is the part from the login.php that refreshs the login


setcookie("id", $user[id],time()+(60*60*24*5), "/", "");
setcookie("pass", $user[password],time()+(60*60*24*5), "/", "");
// the above lines set 2 cookies. 1 with the user's id and another with his/her password.
echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://mydomain.com\"/>Thank You! You will be redirected");
// modify the above line...add in your site url instead of yoursite.com

When I try:


setcookie("id", $user[id],time()+(60*60*24*5), "/", "");
setcookie("pass", $user[password],time()+(60*60*24*5), "/", "");
// the above lines set 2 cookies. 1 with the user's id and another with his/her password.
echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://mydomain.com\"/>Thank You! You will be redirected");
// modify the above line...add in your site url instead of yoursite.com

It loads up my index.php in the iframe.

When I put:


setcookie("id", $user[id],time()+(60*60*24*5), "/", "");
setcookie("pass", $user[password],time()+(60*60*24*5), "/", "");
// the above lines set 2 cookies. 1 with the user's id and another with his/her password.
echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://mydomain.com/login.php\"/>Thank You! You will be redirected");
// modify the above line...add in your site url instead of yoursite.com

It makes the links:


www.mydomain.com/login.php/page1.php

www.mydomain.com/login.php/page2.php

www.mydomain.com/login.php/page3.php

It also makes me sign in twice before it loads the links.

I had a techtuts usersystem on my old site ages ago, just can't remember what to put in.

Thanks in advanced.

Robbie
25-02-2007, 03:47 PM
The code your using makes it refresh/redirect to login.php, i dont know why your doing that

additional
25-02-2007, 03:51 PM
The code your using makes it refresh/redirect to login.php, i dont know why your doing that

Coz I thought I did that on my old site. If I just put my domain in, it loads my index.php (which is my homepage) into the members iframe.

additional
25-02-2007, 04:22 PM
Close thread please.

Ini
26-02-2007, 09:17 PM
just put 'login.php' without your domain. it should then work

Want to hide these adverts? Register an account for free!