Hi..
im PHP user..
i want to get a text box value to the Php variable by clicking hyperlink and i want to send that value to database using mysql query. i want to know that is how can i get text box value to the PHP variable clicking by hyperlink. not by clicking submit button..
thank you..
Kadafiz
0
Light Poster
Recommended Answers
Jump to Posthmm... if I understand you, you have a text box that a user will enter data into and when they click a link (<a href='blah.php'>) you want the contents of that text field passed as a parameter to the file on the link (blah.php). Is that right?
I think …
Jump to Posttry to use
<a href='blah.php?textboxname='+formname.textboxname.value>
something like that.
Jump to Post<script type="text/javascript"> function ftest(){ window.location="totherecievingpagedatabasesave.php?test="+document.getElementById('test').value; } </script> <input type="text" name="test" id="test" /> <a href="javascript:void(0);" onclick="ftest()">click me</a>
then get the text box variable on the receiving end via $_GET;
All 9 Replies
ppetree
2
Junior Poster
blackhole
0
Newbie Poster
ppetree
2
Junior Poster
Kadafiz
0
Light Poster
farhan386
0
Light Poster
ppetree
2
Junior Poster
vaultdweller123
32
Posting Pro
Kadafiz
commented:
thank you
+0
ppetree
2
Junior Poster
Kadafiz
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.