How can I attach 20 buttons to one program and so that each button has aktion = "card.php", but when you click on different buttons, the corresponding actions in the php program are performed?
1 answer
There is such a thing as a function argument, there may be several of them. Code example:
<script type="text/javascript"> var pg; function fc (pg) { if (pg == 'home') { alert('home okok'); } } </script> <input type="button" onclick="fc('home')" value="домой" />
Arguments may be several.
Regarding the connection with pkhp, read the article .
Added from comment.
Like this :
<a href="?param=ololo">link!1</a> <?php if ($_GET['param'] == 'ololo') { echo 'ololo now!1'; } ?>
- I need php and not java - igolka97
- Do you need buttons? Or we will manage links? - Andrei Arshinov
- Hm And how to do it with links? - igolka97
- Added in response. - Andrei Arshinov
|