Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2006, 08:16 PM
Authorized User
 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can you save a url in a session or cookie

First I would like to thank everyone on this forum for their help. Always able to help me solve the problem or learn how to do it.

Here is my question:

I would like to save the url of a page in a session or cookie.

The url to be saved is the current url in the users browser.

I plan to use the onClick(), or if it is possible save the url when the page loads.

Thanks again

 
Old June 22nd, 2006, 01:03 AM
Authorized User
 
Join Date: Jun 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

  $_SERVER['PHP_SELF'] is a variable gives you self URL of your page
if you know how to use sessions you can very well store this like this
$_SESSION["url"]=$_SESSION['PHP_SELF'];
and using sessions you can access this variable from anywhere
 am i understanding your prob well ???
nidhi

nidhi





Similar Threads
Thread Thread Starter Forum Replies Last Post
Save checkbox settings to cookie clockwork Beginning PHP 1 November 20th, 2007 05:45 AM
PHP session cookie ajit Beginning PHP 0 October 23rd, 2007 11:56 PM
Encrypting session cookie krisXp Classic ASP Databases 1 November 9th, 2006 10:21 AM
Cookie and Session rinventive PHP How-To 0 December 6th, 2005 07:09 PM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.