Jump to content

Members List


alen

Recommended Posts

[!--quoteo(post=387406:date=Jun 24 2006, 05:52 AM:name=alen)--][div class=\'quotetop\']QUOTE(alen @ Jun 24 2006, 05:52 AM) [snapback]387406[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Where do you think i could get it?
[/quote]
sorry, we're not here as a resource for ready made scripts. we (try to) help you fix your own code that you are working on.
Link to comment
https://forums.phpfreaks.com/topic/12779-members-list/#findComment-49128
Share on other sites

sessions are really easy. at the beginning of your script, put this:
[code]
<?php
session_start();

//rest of code here
[/code]

then to make a session variable, you just do this:

[code]
$_SESSION['shiz'] = 'i am teh shiz';
[/code]

so let's say you have 2 pages. page1.php will make your variable. page2.php will print it out:

page1.php
[code]
<?php
   session_start(); //tell php we want to access session variables
  
   $_SESSION['shiz'] = 'I am teh shiz'; //create a session var

   //make a simple link to the 2nd page
   echo "<a href='page2.php'>click me to go to page2</a>";
?>
[/code]

page2.php
[code]
<?php
   session_start(); //tell php we want to access session variables

   //always good to check to make sure the variable exists
   //rather than assume it does.
   if ($_SESSION['shiz']) {
     //echo the value out
     echo $_SESSION['shiz'];
   }
?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/12779-members-list/#findComment-49596
Share on other sites

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.