sending a value with input get?

Majik

New Member
\[code\]<a href="http://stackoverflow.com/questions/3586906/companies.php?id='. $_GET['id'] .'&offset='. $next_offset .'"><input id="button" type="button" value="http://stackoverflow.com/questions/3586906/More"/>\[/code\]i somehow want to send &offset=avalue but useing a input button. without the id.how can i do the similer thing with useing form action get ?like ( warning epic fail ) i should add a hidden input or something ?\[code\] echo '<form action="welcome.php" method="get">'; echo '<a href="http://stackoverflow.com/questions/3586906/companies.php?id='. $_GET['id'] .'&offset='. $next_offset .'"><input id="button" type="button" value="http://stackoverflow.com/questions/3586906/More"/></a>'; echo '</form>';\[/code\]please comment if you guys dont understand thanks!ok somehow i have manage to make it work\[code\] echo '<form action="companies.php?id='. $_GET['id'].'" method="get">'; echo '<input type="hidden" name="offset" value="'.$next_offset.'">'; echo '<input id="button" type="submit" value="http://stackoverflow.com/questions/3586906/More"/></a>'; echo '</form>';\[/code\]but still have an error http://localhost/networks/companies.php?offset=5, where does my get id goes ?btw im still checking it out and thanks guys :)and aha! it works\[code\] // MORE PLUGIN echo '<form action="companies.php" method="get">'; echo '<input type="hidden" name="id" value="'.$_GET['id'].'">'; echo '<input type="hidden" name="offset" value="'.$next_offset.'">'; echo '<input id="button" type="submit" value="http://stackoverflow.com/questions/3586906/More"/></a>'; echo '</form>'; // END PLUGIN\[/code\]thanks guys
 
Back
Top