Jump to content

[SOLVED] Session Question!


TheJoey

Recommended Posts

can i call up a session from a previous page?

And another thing

could i implement the code you gave me as.

 

 

if (isset($_SESSION['logged']]) {
  // show whatever
(ALL CART CODE WITH SUBMIT BUTTONS)
} else {
(ALL CART CODE WITHOUT SUBMIT BUTTONS)
}

What exactly do you mean with calling session from previous page?

 

And yes, you can implement given code like that :)

can i call up a session from a previous page?

And another thing

could i implement the code you gave me as.

 

 

if (isset($_SESSION['logged']]) {
  // show whatever
(ALL CART CODE WITH SUBMIT BUTTONS)
} else {
(ALL CART CODE WITHOUT SUBMIT BUTTONS)
}

 

I don't think you should have all the code in that if statement.

i think it would be better if you have all the code and then you do that if statement only for the submit button.

 

i'm not the best php coder but i think it would be better that way.

 

somethin like

<?php
(all cart code before the submit button)

if (isset($_SESSION['logged']]) {
(show submit botton)
} else {
(don't show submit button or some text like "please login")
}

(all cart code after the submit button)

?>

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.