Here is my code. I would like to get the text from the span associated with the input with in LI while submitting the form and after page reloads the text should stick to the div with id "getSpan"
<html>
<head>
</head>
<body>
<form id="myForm" action="so.php" method="get">
<li><span>some text1</span><input name="Load" type="submit" value="Google" /></li>
<li><span>some text2</span><input name="Load" type="submit" value="MSN" /></li>
<li><span>some text3</span><input name="Load" type="submit" value="Yahoo" /></li>
</form>
<div id="container">
<?php
if (isset($_GET['Load'])) {
$value = $_GET['Load'];
echo "<iframe width=\"560\" height=\"349\" src=\"http://www.{$value}.com\"></iframe>";
}
?>
<div id="getSpan"></div>
</div>
</body>
</html>
I tried using hidden type input but the url is showing 2 parameters one for the main input and other for the hidden input which I am trying to avoid.
UPDATE I also tried mixed get and post as suggested by @Paul S but if I use the post method, I cant bookmark the URL's. Someone please help me in solving this issue.
Thanks.