Posted by Matt Madrid on 08/04/07 06:14
comatose wrote:
> Sorry if I don’t explain all the terms correctly, but I’m a newbie.
>
> how can i change this code to accept a session for which week they
> choose, with register_globals = on it worked fine, but my web hosting
> site has changed register globals to off and I’d like to keep it off
> and learn to program without passing variables in the URL.
>
>
> for($i=1;$i<=17;$i++){
> echo "<a
> href='http://".mysite.com."/pool/make_picks_form.php?week=$i'>".$i."</a>";
> echo "     ";
> }
>
> So my question is how to add a session[‘chngweek’] so I know which
> week they picked to view.
session_start();
$_SESSION['week'] = $_REQUEST['week'];
You should read:
http://www.php.net/manual/en/ref.session.php
and
http://www.php.net/manual/en/reserved.variables.php
Navigation:
[Reply to this message]
|