473,387 Members | 1,463 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,387 software developers and data experts.

passing value via href

How do I write a hyperlink that also passes a value to the destination php
page?

Thanks in advance.

~Duane.
Jul 17 '05 #1
3 12310
On Tue, 23 Sep 2003 18:01:52 +0000, Duane Phillips wrote:
How do I write a hyperlink that also passes a value to the destination
php page?

Thanks in advance.

~Duane.


http://servername/index.php?var1=hello&var2=monkey

This will pass an HTTP GET query to the server. Everything after the
question mark is the query, and is "seen" by PHP in the following ways:

* As the $_SERVER["QUERY_STRING"] variable
* As part of the $_SERVER["REQUEST_URI"] variable
* As part of the _SERVER["argv"] variable
* And in the $_GET and $_REQUEST and variables

Also, if register_globals is ON, the variables $var1 and $var2 will be
created.

I guess this is what you were asking...

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Johns Hopkins University | Baltimore, MD
Website | http://www.wse.jhu.edu/newtnotes/

Jul 17 '05 #2

"Jeffrey Silverman" <je*****@jhu.edu> wrote in message
news:pa***************************@jhu.edu...
On Tue, 23 Sep 2003 18:01:52 +0000, Duane Phillips wrote:
I guess this is what you were asking...

<some snippage>

WOW that was a fast reply. Yes, exactly what I was after. I couldn't seem
to remember the construct of the href, nor how to find the value in the next
page... been a long time since I used it, and I couldn't remember where I
used it... lol.

THANKYOU.

~Duane.
Jul 17 '05 #3
On Tue, 23 Sep 2003 18:19:17 +0000, Duane Phillips wrote:

"Jeffrey Silverman" <je*****@jhu.edu> wrote in message
news:pa***************************@jhu.edu...
On Tue, 23 Sep 2003 18:01:52 +0000, Duane Phillips wrote:
I guess this is what you were asking...

<some snippage>

WOW that was a fast reply.

<snip!>

They call me Mr Speedy!


well, actually, they don't.

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Johns Hopkins University | Baltimore, MD
Website | http://www.wse.jhu.edu/newtnotes/

Jul 17 '05 #4

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

Similar topics

1
by: monika | last post by:
hi ... I have an asp page which has 3 buttons. <p align="center"><input class="button" type="button" onClick="location='welStudent.asp';" value="Click to write a new story"></p> <p...
11
by: Dthmtlgod | last post by:
I am having a little difficulty in passing a value from a page to another page. I am going to provide excerpts from the code. I think I am close. This is from Page1.ASP <% Set Conn =...
1
by: franklinbruce | last post by:
Hi all, I have a ASP script which will get 2 query string value. i put val1 Value in a session and pass val2 value to javascript for parent page reload with the specified value. Problem i face is...
1
by: Arlene | last post by:
What I am trying to do is pass the value of a javascript variable as paramter in the href tag. below.. It seems that it should be possible but i can't see to get the right syntax... Any help would...
2
by: sangram | last post by:
Passing value from parent to child window created by Pop up
2
by: =?Utf-8?B?Um95?= | last post by:
Hi all, In a form I have a text called myText as input and need to pass its value to the next page (mySecond.asp) The following works fine and my next page I get the value of myText=test: <a...
1
by: gajahkursi | last post by:
<?php // Connect database include("conf.php"); $child= $_POST; // Get all records in all columns from table and put it in $result. $result=mysql_query("SELECT * FROM parent WHERE child=...
4
idsanjeev
by: idsanjeev | last post by:
SIR I AM PASSING VALUE FROM ONE FORM TO ANOTHER FORM THROUGH COOKIES BUT IS CAN ONLY TRANSFER LAST VALUE HOW CAN PASS VALUE AFTER CLICKIN ON LINK I AM USING THE CODE IS FOR LINK <td><a...
1
by: sva0008 | last post by:
hi , I am using. <input type=button class=tbox value="Populate SA" style="width: 90%"...
10
by: perhapscwk | last post by:
how to passing value from popup to the parent window as a variable which I can access and process the variable(string) in parent window? such as from popup page, we have var_from_popup="abc",...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.