/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Passing Form Variables to Another Form..

I’m back! LOL….

Okay —

So.. I’ve created 2 pages with 2 forms.

[LIST]

  • [*]

    tree-insert-step1.php


  • [*]

    tree-insert-step2.php

  • [/LIST]

    Step 1 inserts all the data for the particular tree.. and Step 2 inserts all the sizes and prices for that tree. Both go in seperate tables — I’ve asked a question before pertaining to this, but I decided to go my original route..

    Now.. right now on Step 2 I just have it pull the most recent tree inserted, so that it can use the tree’s id for the pricing…

    Here’s the clincher though — what if users are creating a tree at the same time? Well then they’ll both be putting in pricing for the same tree..

    BUT..

    I’m not sure how to pass the ID variable.. since its at auto_increment in the database.. it doesn’t get a variable in a text box..

    So is there a way to pull the ID.. so that at Step 2.. it’ll be the right tree.. even if multiple trees were made at the same time?

    to post a comment
    PHP

    1 Comments(s)

    Copy linkTweet thisAlerts:
    @ZnupiFeb 26.2008 — You have two choices (as far as I'm concerned):

  • 1. Use sessions: http://www.php.net/manual/en/ref.session.php

  • 2. Using a hidden input (<input type="hidden" name="tree_id" value="5">)


  • If you need help using one of those, post back ?
    ×

    Success!

    Help @cinematic_jesi spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.19,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...