[thelist] Form Submission (POST)
Martin Burns
martin at easyweb.co.uk
Mon Jun 17 03:50:01 CDT 2002
On Monday, June 17, 2002, at 09:39 am, Burhan Khalid wrote:
> Here is the form :
> <form action="<?= $currentPage; ?>" method="post">
> <input type="hidden" name="verb" value="prev">
> <input type="hidden" name="id" value="<?= $prevVal; ?>">
> <button type="submit">< <</button>
> </form>
> <form action="<?= $currentPage; ?>" method="post">
> <input type="hidden" name="verb" value="next">
> <input type="hidden" name="id" value="<?= $nextVal; ?>">
> <button type="submit">> ></button>
> </form>
It seems you have 3 fields all carrying the same information - where to
go when you click the button. Could you do:
<form action="<?= $currentPage; ?>" method="post">
<button type="submit" name="<?= $prevVal; ?>">< <</button>
<button type="submit" name="<?= $nextVal; ?>">> ></button>
</form>
and parse out verb & id from the name of your submit?
Cheers
Martin
_______________________________________________
email: martin at easyweb.co.uk PGP ID: 0xA835CCCB
martin at members.evolt.org snailmail: 30 Shandon Place
tel: +44 (0)774 063 9985 Edinburgh,
url: http://www.easyweb.co.uk Scotland
More information about the thelist
mailing list