Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Multiple page with same address

  1. #11
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Not sure. Sounds like an error. Do you have an example?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  2. #12
    Join Date
    Aug 2007
    Location
    Malaysia
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No error shown.But first page is topped by second page.

    Seond Page


    First Page

  3. #13
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    "Topped by"? I don't really understand what you mean.

    However, you may want to use another method entirely.

    The methods we posted were designed to simply display pages, not interact.

    With forms like that, you should have a much more specific system setup to send the data from one to the next.

    Something more like what testingsite posted in the first place would make sense here.
    if (isset($_POST['myvariable'])), then you would know that the form has been submitted and you should display the next page.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #14
    Join Date
    Aug 2007
    Location
    Malaysia
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry.I mean topping,the second page appear on top of first page,I am thinking to use session to control all pages shared the same address(reserve.php) and the value selected in drop down menu and radio button also have further processing,like store into database.So is it session much better than include()?

  5. #15
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    session and include are both used, for different reasons.

    I'd suggest taking a step back and figuring out exactly what you want.

    It seems to me that you want a site that will start on a certain page, then submit to a second page, then a third, etc.

    As I said, the options we've given you so far just display the next page, and they don't relate to actual data submission.

    With a system in which you have forms that matter, you will want error checking as well.

    Having two pages would make a lot more sense than combining them into one, especially if this isn't an area of coding you have a lot of experience.
    It IS possible to make them all be one page, but I would suggest a different approach in that case, using get variables (page.php?variable=value) to set which page you're using. You could do the same, though it would take a bit more work to get it to know which page should be used. In that case, you should check which post variables have been set.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #16
    Join Date
    Aug 2007
    Location
    Malaysia
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ya.I want the data pass through several pages,any method for data submission?For now I don't understand that why pages are combined after I reset session.

  7. #17
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Have the form on a single page then submit to another page (action="next.php"). That next page can interpret the data.

    I like this tutorial--
    http://www.php-mysql-tutorial.com/ph...-php-forms.php


    As for why there are two instances of the page, I have no idea. The code I gave should be on a page by itself, then grab the other pages. What you describe could be from having the code I gave you ON one of the pages, so it loops and does it twice. That's all I can think of, really.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •