| re: one html form to call different functions in a single script
charlie fortune wrote:
[color=blue]
> I want to make a database script with several functions, such as
> adding entries, amending, listing etc.
>
> I know how to make a submit button call a php script, but not
> particular functions within that script. I dont suppose I have to
> write a mini script for each function ?[/color]
Big question.
The simplest way to do this without any javascript is to have multiple
submit buttons. Try this code:
<?php echo "the value was: ".$_POST["subber"]; ?>
<form action="submits.php" method="post">
<button type="submit" name="subber" value="hiken">Hi Ken</button>
<button type="submit" name="subber" value="theval">The Value</button>
</form>
To find further tricks, suggest you read the HTML spec on the <button>
element, and read Netscape's material on javascript.
--
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec)ure(Dat)a(.com) |