Maintain variable value?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Garry Jones

    #1

    Maintain variable value?

    In form 1 I have a combo box where the user picks a number

    <select NAME="deltcnt">
    <option VALUE="1">1
    <option VALUE="2">2
    ....
    <option VALUE="99">99

    Form 1 is processed by form 2 where I assign a variable to this number with

    <? $vtcnt = $_POST["deltcnt"]; ?>

    Form 2 is then processed by form 3.

    Is there a simple way to call up this variable and display it on Form 3?

    Garry Jones
    Sweden


  • Kim André Akerø

    #2
    Re: Maintain variable value?

    Garry Jones wrote:
    [color=blue]
    > In form 1 I have a combo box where the user picks a number
    >
    > <select NAME="deltcnt">
    > <option VALUE="1">1
    > <option VALUE="2">2
    > ...
    > <option VALUE="99">99
    >
    > Form 1 is processed by form 2 where I assign a variable to this
    > number with
    >
    > <? $vtcnt = $_POST["deltcnt"]; ?>
    >
    > Form 2 is then processed by form 3.
    >
    > Is there a simple way to call up this variable and display it on Form
    > 3?[/color]

    Yes, just use hidden form fields, like this:

    <input type="hidden" name="fieldname " value="value">

    In your case, use something like this in form 2 (after assigning
    $vtcnt, of course):

    <input type="hidden" name="deltcnt" value="<? echo $vtcnt; ?>">

    --
    Kim André Akerø
    - kimandre@NOSPAM betadome.com
    (remove NOSPAM to contact me directly)

    Comment

    Working...