a.amrita86 Posted July 23, 2008 Share Posted July 23, 2008 I need to pass values on button click from html to php.The button should work similar to a hyperlink as given below <a href="temp2.php?id=ID&flag=2&f=TPL_PG">Edit</a> Quote Link to comment Share on other sites More sharing options...
peranha Posted July 23, 2008 Share Posted July 23, 2008 If you mean the edit to work, then you would use $_GET[] on the page $_GET[id] $_GET[flag] $_GET[f] Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted July 23, 2008 Share Posted July 23, 2008 <input type='button' onclick="location.href='temp2.php?id=ID&flag=2&f=TPL_PG ' " /> Quote Link to comment Share on other sites More sharing options...
tibberous Posted July 23, 2008 Share Posted July 23, 2008 Or, without javascript: <form action='' method='get'> <input type='hidden' name='id' value='ID'> <input type='hidden' name='flag' value='2'> <input type='hidden' name='f' value='TPL_PG'> <input type='submit' value='OldSchool'> </form> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.