I am newbie in php.I don't know how to handle buttons on a page. I have 4 button: insert,update,del,select( view all record of table on database). I want update,del,select button go to 3 other pages. Insert button handle mainpage. Please give me an advice.
Asked
Active
Viewed 55 times
0
-
Have a quick referance [http://stackoverflow.com/questions/5798877/run-a-php-function-upon-button-click](http://stackoverflow.com/questions/5798877/run-a-php-function-upon-button-click) – Lakshmi Prasanna Nov 15 '13 at 07:09
-
if only redirect, try use link instead buttons. Look http://stackoverflow.com/questions/710089/how-do-i-make-an-html-link-look-like-a-button for example. – Vbyec Nov 15 '13 at 07:11
-
Sorry. but all 4 buttons have same tag – Haruji Burke Nov 15 '13 at 07:19
-
create different forms for 4 buttons as submit buttons with action value for each as url to the page required.on clicking the form will be submitted(redirected) to that page – Bhadra Nov 15 '13 at 07:22
-
Do you have to use buttons? Why can't u use text instead and use a href? – usrNotFound Nov 15 '13 at 07:59
1 Answers
0
hope this helps
<form action="your normal url">
<input type="submit" name="select" value="select"><br>
<input type="submit" name="delete" value="delete"><br>
<input type="submit" name="update" value="update"><br>
<input type="submit" name="insert" value="insert" formaction="your other page url">
</form>
Wanna learn about it click formaction

Let me see
- 5,063
- 9
- 34
- 47