How do you get variable to the other side of a script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pete horm

    How do you get variable to the other side of a script

    Hi Everyone,
    I don't have very much experience programming at all, so bear with me. I
    have a Service Request web form that is setup as follows:

    Index.html Login Page-//Usernames on MySQL -->

    trylogon.php-//Use $POST for Usernames and Passwords authenticates then
    opens -->

    Form.php-//Submit service request to MySQL -->

    Add.php-//Adds info to the database, prints confirmation page.

    This is all working fine. The one problem is that the "Form.php" page
    makes them enter their Username again in the form. Users would like it to
    automatically populate that with the Username they plugged into the Login
    page. I don't know how to go about this? Some of the things I have tried
    simply won't pass the variable for the Username to the Form after it goes
    through trylogon.php. I have PHP 5.12, and global variables are turned
    off by default. Any suggestions that you can offer a "newb"?

    Thanks for any help you can offer?

    pete



  • rf

    #2
    Re: How do you get variable to the other side of a script

    use sessions

    Comment

    • Pedro Graca

      #3
      Re: How do you get variable to the other side of a script

      pete horm wrote:[color=blue]
      > Index.html Login Page-//Usernames on MySQL -->
      >
      > trylogon.php-//Use $POST for Usernames and Passwords authenticates then
      > opens -->
      >
      > Form.php-//Submit service request to MySQL -->
      >
      > Add.php-//Adds info to the database, prints confirmation page.
      >
      > This is all working fine. The one problem is that the "Form.php" page
      > makes them enter their Username again in the form. Users would like it to
      > automatically populate that with the Username they plugged into the Login
      > page. I don't know how to go about this?[/color]
      <snip>

      Try replacing your

      <input type="text" name="username" >

      with

      <input type="text" name="username" value="<?php echo $username; ?>">

      --
      If you're posting through Google read <http://cfaj.freeshell. org/google>

      Comment

      Working...