I have a page that is utilizing jquery, mysql and php. In the page I have an input such as below
<input type="text" name="numberid" id="textbox1" value="12345" />
I am trying to take this info textbox1 and to combine it with a php statement that pulls from a mysql database to create a button redirect to a site. I have accomplished the url and pulled the $item but do not know how to attach the textbox1 variable value to the end of url after ?Id=
<span style="margin-left:10px;"><a href="http://www.example.com/<?php echo $item?>?Id=textbox1"><input type="button" class="btn btn-info edit" value="Share" style="width:100px; height:50px" id="<?php echo $id; ?>"name="<?php echo $parent; ?>"></a></span>
Use something like this maybe a class
<a class="pressthis" href="#" data-mhtml="put your html reference here" >
Then use a function like the following
$(".pressthis").click(function() {
var myhtml = $(this).data('mhtml');
myhtml = myhtml + "&yourtextbox=" + $textbox1.val();
window.location = myhtml
});
This would allow you to have any number of html links handled by the same function, Obviously if you want to add some id to the end of the html, like the contents of your textbox then just then just add the content of the textbox to the myhtml string
myhtml = myhtml + "&yourtextbox=" + $textbox1.val();
</div>