My php file account.php contains php with the variable $account but the form where it is needed is in html which is echoed in the php, how do i get the php code:

<input type="hidden" name="data1" value="<?= $account ?>">

 - or something equivalent

into the html form:

echo'
<br>
<p class="style2">Add New Users </p>
<form method="post" action="nuser.php">
Email:
<input type="text" size=25 name= "nemail">

........ect, ect....

where i dont want the user to enter the account # which is needed in nuser.php but rather use the $account

    So you want to pass a variable from one script to another, BUT you don't want it transmitted across a form, URL encoded, etc.?

    An easy solution would be to use a [man]session[/man]. Read up on em and give em a shot. There are some excellent examples.

      i really dont want to use a session if i dont have to... i dont have a lot of time to learn how to do it that way - im looking for a quick fix

      Adam

        Let's put it this way; in the time between your last post and this one (one hour), you could have learned.

        <?php // Page 1
        session_start();
        $_SESSION['account'] = 23223;
        ?>
        ....
        <?php // Page 2
        session_start();
        echo $_SESSION['account'];
        ?>
        

        Quick enough?

          Write a Reply...