473,545 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 12315
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_STRI NG"] variable
* As part of the $_SERVER["REQUEST_UR I"] variable
* As part of the _SERVER["argv"] variable
* And in the $_GET and $_REQUEST and variables

Also, if register_global s 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.ed u> 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.ed u> 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
5745
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 align="center"><input class="button" type="button" onClick="location='draftedStory.asp';" value="Click to complete the drafted story"></p> <p align="center">...
11
2095
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 = Server.CreateObject("ADODB.Connection") DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; " DSNtest=dsntest & "DBQ=" & Server.MapPath("ncci.mdb")...
1
1930
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 i dont invoke any function to pass the val2 as paremeter. this is the code i wrote which works fine when i give id=29. Instead of 29 i want the...
1
4326
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 be appreciated. <a href="reports_Info_xl.cfm?term=javascript:thisTerm" target="_blank">Data (Excel Spreadsheet)</a>
2
7862
by: sangram | last post by:
Passing value from parent to child window created by Pop up
2
5265
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 href="mySecond.asp?MyText=test">click here</a> But, I need to pass document.myform.myText.value instead of test value. I have problem with the syntax....
1
2943
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= '$child'") or die ("error making query");
4
2819
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 href=voicereply.asp?opt1=<%=R("top_id")%>>Reply</a></td> FOR STORING IN COOKIES response.cookies("vtopid")=R("top_id") TO PASS ON NEXT PAGE AND WANT TO...
1
2017
by: sva0008 | last post by:
hi , I am using. <input type=button class=tbox value="Populate SA" style="width: 90%" onClick="window.location='../SA/Sample.asp?ToDo=FromFeed&ContactName=<%=FirstName%>&Address=<%=Address%>&City=<%=City%>&State=<%=state%>&ZipCode=<%=Zip%>&Phone=<%=ContactPhone%>&Notes=<%=Comments%><%=resolution%>&ordDate=<%=Date%>';" > for passing value...
10
11786
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", after the popup closed, then from parent window, we can use alert(var_from_popup) and it will show us the "abc"?
0
7479
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7669
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7926
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7439
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5987
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4962
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3468
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.