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
https://forums.phpfreaks.com/topic/180589-hard-question-hope-you-have-time/
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).

 

 

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
}
			?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.