Connecting Tech Pros Worldwide Help | Site Map

one html form to call different functions in a single script

  #1  
Old July 17th, 2005, 01:16 PM
charlie fortune
Guest
 
Posts: n/a
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 ?
  #2  
Old July 17th, 2005, 01:16 PM
Kenneth Downs
Guest
 
Posts: n/a

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)
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 04:15 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 11:37 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 09:56 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 03:15 AM