...

View Full Version : PHP Frames not loading second frame



synking
03-11-2009, 06:17 PM
hey i am having and issue with frames and php.

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


<?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.

sea4me
03-12-2009, 03:04 AM
echo $win , $walktype , and $walkemail somewhere and see if the variables are all set correctly...

Other than that, try:

<?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...

synking
03-13-2009, 03:45 PM
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.


<!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.

sea4me
03-13-2009, 11:17 PM
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...

synking
03-14-2009, 03:27 PM
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.

sea4me
03-14-2009, 09:13 PM
Try including the page instead of a frameset.



<?php
include 'ME/dialup.php';
include '/text/ME/dialup.php.php';
?>


Create that page in the same directory as the other script. :cool:

synking
03-14-2009, 10:19 PM
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.

sea4me
03-14-2009, 11:04 PM
I mean like have the top and bottom included to see if the 2nd one will show...

synking
03-16-2009, 02:22 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum