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 Posttry to use
<a href='blah.php?textboxname='+formname.textboxname.value>
something like that.
Jump to Post<a href='blah.php?textboxname='+formname.textboxname.value>
just read using $_GET
alternatively, use an ordinary FORM, and submit it using javascript.
onclick = "document.forms[0].submit()"
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.