Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-06-2012, 11:46 PM   PM User | #1
zingzing45
New Coder

 
Join Date: Jun 2012
Posts: 57
Thanks: 13
Thanked 0 Times in 0 Posts
zingzing45 is an unknown quantity at this point
Question on log in system

Ok, so if a user registers on my site, then how can I make it so that they are automatically logged in?

I've tried setting something like:

PHP Code:
$_SESSION["Login"] = "Yes"
on the registration page,

and then specifying a username the same way, but the log in still doesn't work.




Can anyone suggest a way to make this work?
zingzing45 is offline   Reply With Quote
Old 09-07-2012, 12:17 AM   PM User | #2
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,496
Thanks: 44
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Quote:
Originally Posted by zingzing45 View Post
but the log in still doesn't work.
I get bored asking this..

In what way, does it not work? Do you get a blank screen, an error message.. ?
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is online now   Reply With Quote
Old 09-08-2012, 06:53 PM   PM User | #3
zingzing45
New Coder

 
Join Date: Jun 2012
Posts: 57
Thanks: 13
Thanked 0 Times in 0 Posts
zingzing45 is an unknown quantity at this point
Instead of showing your login information, like your username and points and stuff,

it just shows the login and register tabs, and the input text boxes that appear when you're not logged in...
zingzing45 is offline   Reply With Quote
Old 09-08-2012, 06:57 PM   PM User | #4
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,496
Thanks: 44
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
You're still being very vague. YOU know exactly what you're talking about. The rest of us haven't got a clue. You've not shown any source code in php or html.

Try showing us some code wrapped in [php] tags and we'll do what we can to help.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is online now   Reply With Quote
Old 09-08-2012, 11:43 PM   PM User | #5
vroom
New Coder

 
Join Date: Sep 2012
Posts: 71
Thanks: 0
Thanked 8 Times in 8 Posts
vroom is an unknown quantity at this point
As above, more information, try breaking things down a bit...

1) On page xyz.php they register using code on page wxy.php (if not the same).
- more details... I do/don't redirect the user.

2) Upon registration page xyz.php defines session variables a, b and c.
- more details... I do/don't redirect the user.

3) On page vwx.php I want the user details to display based on session variable a.
- I do/don't know if the session variable is present on page vwx.php.
- I do/don't know that user details are retrieved using the session variable.

Give us the logical sequence, whats being done or attempted, and the things you have been able to figure out so far.

Last edited by vroom; 09-08-2012 at 11:44 PM.. Reason: spelling
vroom is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:13 AM.


Advertisement
Log in to turn off these ads.