473,320 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Page reloading problem

Hi All,
Here's my problem. I'm having trouble managing the additional variables
on the end of my URL. For example, I might have a URL like the following:

http://www.mydomain.com/index.php&option1=5&option2=7

It's the 'option' variables I'm having problems with. I would typically use
variables of this form to control various aspects of the current page.
However, the actual options present will be dependant on the current mode of
the page. Now lets say that I want to put a link on my page that adds a new
'option3' variable and reloads the page. The php might look like:
echo '<A
HREF="'.$_SERVER['PHP_SELF'].'?'.SID.'&option1=5&option2=7&option3=6'."\">ne
w link with new option</A>\n";

But I can't really use this because this page might not actually contain
option1 and option2 - it may have option5 and option6 instead. What I want
to be able to do is to leave the current options alone and just add the ones
I want to add. What is the best way of doing this?.

I reckon the best way to handle it would be to have a $_SERVER variable that
would give me the full current URL including all of the options. That way I
could a line similar to:

echo '<A HREF="'.$_SERVER['FULL_URL'].'?'.SID.'&option3=5'."\">new link with
new option</A>\n";

and it would just work. Is there such a variable?, or is there a better way
of doing this?.

Ta in advance,
Dave

Dec 20 '05 #1
1 1341
On Tue, 20 Dec 2005 22:56:42 +0000, Dave Moore wrote:
and it would just work. Is there such a variable?, or is there a better way
of doing this?.


What is wrong with $_SERVER['PHP_SELF']?

--
http://www.mgogala.com

Dec 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated...
1
by: Mad Scientist Jr | last post by:
How do you get a ASP.NET page to return nothing, so the page posting form data to it doesn't reload? I have tried all combinations of the following: Response.SuppressContent = True...
2
by: Urs Vogel | last post by:
Hi I would like to update certain controls based on the user's entered data (e.g. entering a cutomer id would display the name and address). This wouldn' be a problem, but I would like to do...
3
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something...
1
by: Alex Gurevich | last post by:
Hi, I am having very strange problem, I have Dropdownlist (DDL) with callback function for SelectedIndexChanged event on asp.net page, which is populated in codebehind Page_OnLoad page. After...
6
by: Jorge Luzarraga Castro | last post by:
Hey, hope you can help with this. I have an aspx page which contains several User Control. At the beggining there´s only one visible User Control but after working with the page additional UC...
8
by: Salvatore Sanfilippo | last post by:
Hello all, I've a very simple problem that appears to don't have a simple solution. I've a (dynamically generated) page with a number of external links. What I need is that if the user clicks...
2
by: Code Monkey | last post by:
Is it possible to update a section on a masterpage from a method on a content page? Ie; suppose I've got an area on a masterpage which is essentially a shopping cart which is displayed on...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
5
by: henryrhenryr | last post by:
Appologies for unclear title. I don't really understand the problem I'm facing. My system: PHP 5.2.1, Win2K, Apache 2, MySQL 5 (local - problem is same on my live site running php 4.3.9, Linux,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.