/    Sign up×
Community /Pin to ProfileBookmark

POST variable question with 3 different files.

hey guys,

1.I have three files, for this thread..ill name them files…1.php 2.php 3.php

  • 2.

    php has a form which has a drop box called ‘check’ and the action of the form is set to POST the value to 2.php.

  • 3.

    I pass the value of $_POST[“‘check”] into a variable called $check on file 2.php which then filters a query and the results of that query are passed to another form which has a selection box. The selection box is also set to POST the selection of the dropbox into 3.php.

  • [B]My question is:
    [/B]

    When records get displayed on 3.php, the records are getting filtered from the selection of 2.php. Additionaly, I also need to filter records from 3.php based on the selection that was made on file 1.php. Is there any way that I can pass the POST ‘checkbox’ value into 3.php? So Im thinking amongst these lines…make selection on 1.php, POST value into 2.php, and also carry value of ‘check’ into 3.php. Is this possible?? Any suggestions are welcomed :p

    to post a comment
    PHP

    12 Comments(s)

    Copy linkTweet thisAlerts:
    @chrysMay 26.2005 — My question is: Is it absolutely necessary for you to use three different files?
    Copy linkTweet thisAlerts:
    @vicpal25authorMay 26.2005 — yes, the first file has three selections, based on that, it filters out the selections on the second file (2.php) which then narrows down the records displayed on the third file (3.php).
    Copy linkTweet thisAlerts:
    @chrysMay 26.2005 — Ok, so... any fields you want to maintain throughout multiple pages can be maintained through two methods:

    a.) Use sessions (could be overkill if it's a small form)

    b.) Retain the values by using <input type="hidden" name="varname" value="varvalue"> for all variables that you want to pass to 3.php in the form on 2.php

    Does this answer your question and is it clear?
    Copy linkTweet thisAlerts:
    @vicpal25authorMay 26.2005 — niccccceeee i like your second suggestion.yeah a hidden field duhhh hey thanks man..yeah a session would be overkill..thanks for the heads up! ?
    Copy linkTweet thisAlerts:
    @chrysMay 26.2005 — No prob ? I'll try to be here every day to answer questions.. I've been through like.. every problem ever in the past 7 years that I've used PHP ?
    Copy linkTweet thisAlerts:
    @vicpal25authorMay 26.2005 — haha...thats tight..my goal is to be there hehe ?
    Copy linkTweet thisAlerts:
    @chrysMay 26.2005 — haha...thats tight..my goal is to be there hehe ?[/QUOTE]

    There were many headaches... many moments of intense anger... but I made it through the ordeal and here I am working full time doing it ?

    Good luck with everything, I'll be around.
    Copy linkTweet thisAlerts:
    @vicpal25authorMay 26.2005 — nice..did you learn any other server side languages?? which ones do you strongly recommend..im focusing strictly on PHP and some ASP...thinking of getting into cold fusion of .net...what do you think..
    Copy linkTweet thisAlerts:
    @chrysMay 26.2005 — nice..did you learn any other server side languages?? which ones do you strongly recommend..im focusing strictly on PHP and some ASP...thinking of getting into cold fusion of .net...what do you think..[/QUOTE]

    I have only used PHP... because it runs on Linux w/ Apache, it's secure, it's easy, and very powerful.

    I've actually never used ASP (.NET), but my friend has and it's really easy to put together web applications... it like, does everything for you, just like any other visual editor (VB, VC++) you can just insert html elements and whatever, database elements, it's that type of deal.

    I've used CF before, and it's nothing special. It's format fits into html, it uses tags:

    <CFIF this>blah...<CFELSE>woot</CFIF>

    That was 4 years ago.

    I am the most familiar with PHP and I have never come accross something I couldn't accomplish using it (except real-time stuff, but that is why I'm getting into JavaScript now, which is REALLY useful)
    Copy linkTweet thisAlerts:
    @vicpal25authorMay 26.2005 — oh nice to hear that..yeah i took several VB classes in school before but yeah it works like you said..I have no .NET experience what so ever though..I see lots of demand in the market though....kinda makes me take a look at it twice...and colfusion is the same story...but overall I love PHP..like you said you can do everything and anything with it..I only worked with it through windows ...but i should get a lunux box huh and learn from there..
    Copy linkTweet thisAlerts:
    @chrysMay 26.2005 — oh nice to hear that..yeah i took several VB classes in school before but yeah it works like you said..I have no .NET experience what so ever though..I see lots of demand in the market though....kinda makes me take a look at it twice...and colfusion is the same story...but overall I love PHP..like you said you can do everything and anything with it..I only worked with it through windows ...but i should get a lunux box huh and learn from there..[/QUOTE]


    When I was looking for jobs I saw a lot of demand for .NET programmers, and it sucked. Luckily I found a job here where the run Linux and Apache and PHP/MySQL which is what i LIVE in, lol.

    Any good programmer can pick up new languages like this *snaps fingers*, because the logic is the same, you just need to learn the variation in syntax and functions.

    PHP in windows is fine as long as it runs under Apache and not IIS (NEVER). I just like linux better for web development. I actually use dreamweaver as my code editor because of it's site management feature, I haven't had any issues.
    Copy linkTweet thisAlerts:
    @vicpal25authorMay 26.2005 — nice..can you make a nice living by just knowing PHP...this past year I have learned to work with XHTML, ive been polishing my PHP skills, and getting into XML and XSLT and all of that stuff..you think its a good route?..it is time consuming though huh...
    ×

    Success!

    Help @vicpal25 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.4,
    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: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

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

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...