Jump to content

Hard Question Hope You Have Time :)


Rifts

Recommended Posts

Hey Everyone..

 

Here is what is going on...

 

on my website I have a login on the top rightish after someone logs in I want that login form to go away and have other information there.

 

I'm not really sure where to even start with this.

 

(everything else is done in terms of the actual login with php/mysql works and stuff.)

Link to comment
Share on other sites

You need to change 'logged_in' to whatever the name your login script uses

 

It looks as if it's probably using cookies anyhow rather than sessionsbecause you're getting the error because you need session_start(); at the top of the document (but it would have this anyway if it was using sessions).

 

 

Link to comment
Share on other sites

Here is the code I put where my login form is...  I have tried changing "login" to "$login" as that is what it is in my login-exec im just trying to get it to say "HTML FOR NOT LOGGED IN HERE". Im not going to mess around and put the actual login form there untill it says that without errors..

 

 

<?php

			session_start();
			if($_SESSION['login'] == true) {
                 ?>HTML HERE FOR LOGGED IN<?php
                 }else{
                 ?>HTML FOR NOT LOGGED IN HERE<?php
}
			?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.