#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Jenks, Oklahoma, United States
    Posts
    7
    Rep Power
    0
    I have a page rigged up where someone has to enter a name and password, and then below it some variables that they enter along with it. If it is the correct password and username, I need the data they entered after it to be sent to another file - one that can be automatically updated as it recieves the data. I know this is somewhat vague, but I have limited databasing knowledge... Any help would be greatly appreciated.

    -Mystic
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,640
    Rep Power
    4476
    Do you already have a way of checking the username and password, or are you asking for that too?

    I'm having a hard time understanding exactly what you want...

    If you have values submitted to one page, and you want to pass them along to another page, then you either have to put them into the url, or create another form and submit it. Let's say your other variables are $color, $food, and $pet. If you want to make a link that'll carry these variables to another page, you'd use:

    <?php
    echo "<a href="page3.php?color=$color&food=$food&pet=$pet">Click here</a>";
    ?>

    now..if you want it so the user doesn't have to click on anything, then you'd have to do something like this...

    <body onload="document.form_name.submit();">
    <form method="post" action="page3.php" name="form_name">
    <input type=hidden name="color" value="<?php echo $color; ?>">
    <input type=hidden name="food" value="<?php echo $food; ?>">
    <input type=hidden name="pet" value="<?php echo $pet; ?>">
    </form>
    </body>

    Modify and salt to taste...

    Do you really need to send these variable to a third page? why not have everything on the page that checks the username and password? Or maybe i'm way off base already....

    ---John Holmes...

    [This message has been edited by SepodatiCreations (edited October 22, 2000).]
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Jenks, Oklahoma, United States
    Posts
    7
    Rep Power
    0
    Thanks... so far.

    All right, what you've told me so far is very helpful. I have the username and password fields as well as the 3 data sources (let's use your example $color, $food, and $pet) all on the same page. When they submit the page, the username and password are checked, and then I need the latter 3 ($color, $food, and $pet) to be sent automatically to another page that will be updated - I suppose a database of some sort. And that's all with one command, so if the username password is not correct, nothing is done with the 3 pieces of data.

    -Mystic
  6. #4
  7. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,640
    Rep Power
    4476
    Why do you have to send them to a third page? You can probably do everything on one page. What are you going to do with these variables once they get to the third page?

    ---JH
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Jenks, Oklahoma, United States
    Posts
    7
    Rep Power
    0
    All right:

    What I'm doing is creating tutorials (HTML, Forms, all that good stuff) on my web site. When they click on the link to the tutorial they are prompted to enter their name, and then when they do, they are sent to lesson #1. Then, throughout the tutorial, I refer to them - their name rather - so it's kinda' neat - like it adds personallity to the tutorial. And I need the information that was sent to the first page to be sent to the next ones when they click on the link to go to the next ones.

    -Colin

Similar Threads

  1. Newbie needing help sending data to mysql database
    By blackface in forum PHP Development
    Replies: 3
    Last Post: February 13th, 2004, 12:26 AM
  2. Sending data from form to database securely!
    By dr.phil in forum PHP Development
    Replies: 2
    Last Post: February 12th, 2004, 06:52 AM
  3. Replies: 3
    Last Post: February 11th, 2004, 08:30 AM
  4. Retreiving data from a database
    By boddah in forum ASP Programming
    Replies: 0
    Last Post: January 30th, 2004, 05:55 PM
  5. Need help with posting data onto a form
    By onLOoker in forum Perl Programming
    Replies: 2
    Last Post: January 25th, 2004, 08:58 PM

IMN logo majestic logo threadwatch logo seochat tools logo