coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: gymnastdude182 on January 10, 2006, 04:15:58 AM

Title: How To Get Login Box To Work
Post by: gymnastdude182 on January 10, 2006, 04:15:58 AM
Hi! Thanks for coming into this thread. I made a login box (with images) . When you type the username and password, and click login it will take you to the login page (in internet explorer) and makes you log in there... in mozilla, it takes you to the login.php page saying "Welcome test..." I want it to directly go to the index without saying that ( and still be logged in). does anyone know how to do this?

url: http://www.slave4u.com/backup/
username: test
password: test

- Thanks so much for your time!
Title: Re: How To Get Login Box To Work
Post by: gymnastdude182 on January 14, 2006, 04:24:53 AM
please? somebody.
Title: Re: How To Get Login Box To Work
Post by: Abbas Ali on January 14, 2006, 06:26:10 AM
Edit login.php

Replace


        pageheader($lang_login_php['login'], "<META http-equiv=\"refresh\" content=\"3;url=$referer\">");
        msg_box($lang_login_php['login'], sprintf($lang_login_php['welcome'], $USER_DATA['user_name']), $lang_continue, $referer);
        pagefooter();


with


        header("Location: $referer");
Title: Re: How To Get Login Box To Work
Post by: gymnastdude182 on January 14, 2006, 08:10:51 AM
hey thanks for replying! The log in works in mozilla, but not internet explorer! I don't know how to fix it. In mozilla it will log you in. In internet explorer, it will take you to the login.php page and make you log in there. ANY idea on how to fix that?

p.s. - thanks again for reading!
Title: Re: How To Get Login Box To Work
Post by: Abbas Ali on January 14, 2006, 08:21:37 AM
I don't know why that is happening. May be some cookie issues with IE. Make sure that in IE "Allow all cookies" setting is set to yes.
Title: Re: How To Get Login Box To Work
Post by: gymnastdude182 on January 15, 2006, 04:37:58 AM
I made it so my IE accepts all cookies, and it stillllll did not work. I don't know what else to do. Is there another way to code this?
Title: Re: How To Get Login Box To Work
Post by: Abbas Ali on January 16, 2006, 06:17:33 AM
Other option would be to modify login.php to change the looks of that page instead of making a separate login page and then posting the form on original login.php
Title: Re: How To Get Login Box To Work
Post by: gymnastdude182 on January 16, 2006, 07:05:55 AM
The weird thing is, it works PERFECTLY in every browser when it says:

Quote<input input name="submitted" type="submit" class="button" value="Login">

- That is for the button. When I use this html for an image, it won't work in IE at all if you are not logged in. If you are logged in, and go back to that page and re-type the username and password, it will say "You are already logged in !"

Quote<input input name="submitted" type="image" class="submit" value="Login" src="http://www.slave4u.com/backup/themes/tan/login/login_13.jpg">

- That won't work! I do NOT understand why. Is there another way of going about this. I tried editing the login.php page, but that just lead to more problems. I am so close on this. thanks for your help too! how do I fix this.
Title: Re: How To Get Login Box To Work
Post by: Abbas Ali on January 16, 2006, 07:11:06 AM
Change


<input input name="submitted" type="image" class="submit" value="Login" src="http://www.slave4u.com/backup/themes/tan/login/login_13.jpg">


to


<input name="submitted" type="image" class="submit" value="Login" src="http://www.slave4u.com/backup/themes/tan/login/login_13.jpg">


and try.
Title: Re: How To Get Login Box To Work
Post by: gymnastdude182 on January 16, 2006, 07:17:27 AM
That didn't work. only because I mispelled the code above this post. damn it I had some hope haha. I meant to put:

Quote<input name="submitted" type="image" class="submit" value="Login" src="http://www.slave4u.com/backup/themes/tan/login/login_13.jpg">

--- should i just face the facts that it isnt ever going to work (for some unknown reason) ?
Title: Re: How To Get Login Box To Work
Post by: Abbas Ali on January 16, 2006, 07:24:23 AM
Hmmm...I think i found the problem.

Edit login.php

Replace


if (isset($_POST['submitted'])) {


with


if (isset($_POST['submitted']) || isset($_POST['submitted_x'])) {


I think $_POST['submitted'] is not coming in IE and hence that problem is occuring.
Title: Re: How To Get Login Box To Work
Post by: gymnastdude182 on January 16, 2006, 09:01:39 PM
ahhhhhhhhhhhhhhhhhhh! It freaking works! Dude, you are my hero! That did the trick. Thanks SOOO much I seriously really apprecitae it!!!