Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Frames not loading second frame

    hey i am having and issue with frames and php.

    I am running to if statements that echo the src for the frame

    PHP Code:
    <?PHP

    $win      
    $_POST['walkos'];
    $walktype $_POST['walktype'];
    $walkemail $_POST['walkemail'];
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
       "http://www.w3.org/TR/html4/frameset.dtd">

    <html>
    <head><title>walk thorugh</title></head>
    <FRAMESET row="70, *">
       <FRAME src="<?php
     
    if ((($win == "XP") || ($win ==  "Vista") || ($win ==  "2000") || ($win ==  "98") || ($win ==  "ME")) && ($walktype == "email")) {
            echo (
    "$win/$walkemail.php");
    } elseif (((
    $win == "Mac")) && ($walktype == "email"))  {
            echo (
    "$win/$walkemail.php");
    } elseif (((
    $win == "XP") || ($win == "Vista") || ($win == "2000") || ($win == "98") || ($win == "ME")) && ($walktype == "dialup"))  {
            echo (
    "$win/$walktype.php");
    } elseif (((
    $win == "Mac")) && ($walktype == "dialup")) {
            echo (
    "$win/$walktype.php");
    } else {
            echo (
    "invalid selection please go back and choose again <br> \n");
    }
    ?>" frameborder="1" scrolling="auto" name="Walkthorughimage">
       <FRAME src="<?php
     
    if ((($win == "XP") || ($win ==  "Vista") || ($win ==  "2000") || ($win ==  "98") || ($win ==  "ME")) && ($walktype == "email")) {
            include (
    "/text/$win/$walkemail.php");
    } elseif (((
    $win == "Mac")) && ($walktype == "email"))  {
            echo (
    "/text/$win/$walktype.php");
    } elseif (((
    $win == "XP") || ($win == "Vista") || ($win == "2000") || ($win == "98") || ($win == "ME")) && ($walktype == "dialup"))  {
            echo (
    "/text/$win/$walktype.php");
    } elseif (((
    $win == "Mac")) && ($walktype == "dialup")) {
            echo (
    "/text/$win/$walktype.php");
    } else {
            echo (
    "invalid selection please go back and choose again <br> \n");
    }
    ?>" scrolling="auto" frameborder="1"  name="walkthroughtext">
    </FRAMESET>
    </html>
    but when the page loads only the top frame is shown. any one got any suggestions.
    Last edited by synking; 03-11-2009 at 07:22 PM. Reason: clean up

  • #2
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    echo $win , $walktype , and $walkemail somewhere and see if the variables are all set correctly...

    Other than that, try:
    PHP Code:
    <?php
    $win      
    $_POST['walkos'];
    $walktype $_POST['walktype'];
    $walkemail $_POST['walkemail'];
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
       "http://www.w3.org/TR/html4/frameset.dtd">

    <html>
    <head><title>walk thorugh</title></head>
    <FRAMESET row="70, *" cols="*,*">
       <FRAME src="<?php
     
    if ($win == "XP" || $win ==  "Vista" || $win ==  "2000" || $win ==  "98" || $win ==  "ME" && $walktype == "email") {
            echo 
    "$win/$walkemail.php";
    } elseif (
    $win == "Mac" && $walktype == "email")  {
            echo 
    "$win/$walkemail.php";
    } elseif (
    $win == "XP") || $win == "Vista" || $win == "2000") || $win == "98" || $win == "ME" && $walktype == "dialup")  {
            echo 
    "$win/$walktype.php";
    } elseif (
    $win == "Mac" && $walktype == "dialup") {
            echo 
    "$win/$walktype.php";
    } else {
            echo 
    "invalid selection please go back and choose again <br> \n");
    }
    ?>" frameborder="1" scrolling="auto" name="Walkthorughimage">
       <FRAME src="<?php
     
    if ($win == "XP" || $win ==  "Vista") || $win ==  "2000" || $win ==  "98" || $win ==  "ME" && $walktype == "email") {
            include (
    "/text/$win/$walkemail.php";
    } elseif (
    $win == "Mac" && $walktype == "email")  {
            echo 
    "/text/$win/$walktype.php";
    } elseif (
    $win == "XP" || $win == "Vista" || $win == "2000" || $win == "98" || $win == "ME" && $walktype == "dialup"))  {
            echo 
    "/text/$win/$walktype.php";
    } elseif (
    $win == "Mac" && $walktype == "dialup") {
            echo 
    "/text/$win/$walktype.php";
    } else {
            echo 
    "invalid selection please go back and choose again <br> \n");
    }
    ?>" scrolling="auto" frameborder="1"  name="walkthroughtext">
    </FRAMESET>
    </html>
    Also try looking at the source code of the page after it loads and post it...

  • #3
    New Coder
    Join Date
    Jul 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok thanks but i have used print_r($_POST) and got all the correct assignments out of the page. the Frameset page source is this.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
       "http://www.w3.org/TR/html4/frameset.dtd">
    
    <html>
    <head><title>walk thorugh</title></head>
    <FRAMESET row="70,*">
       <FRAME src="ME/dialup.php" frameborder="1" scrolling="auto" name="Walkthorughimage">
       <FRAME src="/text/ME/dialup.php" scrolling="auto" frameborder="1"  name="walkthroughtext">
    </FRAMESET>
    </html>
    it should be correct but you only see the top frame.

  • #4
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    are you sure that this exists:

    /text/ME/dialup.php

    If it does then it's not a PHP problem....

    Try different browsers or clear your cache or maybe even cookies...

  • #5
    New Coder
    Join Date
    Jul 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes all the files exist is some way even if it is filler. and the only thing that displays is whatever is in the top frame. no matter what browser i view it in.

  • #6
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    Try including the page instead of a frameset.

    PHP Code:
    <?php
    include 'ME/dialup.php';
    include 
    '/text/ME/dialup.php.php';
    ?>
    Create that page in the same directory as the other script.

  • #7
    New Coder
    Join Date
    Jul 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeah.... i thought of doing that but the top frame will actually change a lot while the bottom one will stay static and i was unable to make that work with divs and includes. if you know of a good walk through or tutorial that will show me how to do that it would be great...

    what i am attempting to do is a point and click walk through on how to install a manual dialer and email programs. where the top frame would be the images with areas for the link to the next image while the other is the step by step for the walk through. if that helps.

  • #8
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    I mean like have the top and bottom included to see if the 2nd one will show...

  • #9
    New Coder
    Join Date
    Jul 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeah both the pages show up when i include them even when i include through the if statements on a different page with out the frames. but when i put them in frames they both don't show up.


  •  

    Posting Permissions

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