Jump to content

Just a little help please


Rabbar

Recommended Posts

Hello I really need a little help with this

 

<?php

(nothing important here)

 

HERE I NEED HELP!!!

    if ($bla == "blabla")  """then I want to open "first file.php" in the iframe"""

    else """then I want to open "second file.php" in the iframe"""

}

?>

<iframe src="???" name="mainframe" height="600px" width="800px">

</iframe>

 

Can someone please help me with this?

Link to comment
Share on other sites

No... I want to open the file in the iframe not just open it in new window or something.

 

if ($bla == "blabla")  """then I want to open "first file.php" in the iframe"""

    else """then I want to open "second file.php" in the iframe"""

 

<iframe src="" name="mainframe" height="600px" width="800px">

</iframe>

Link to comment
Share on other sites

LIKE THIS IT DOES NOT WORK

 

<?php

if ($bla == 'blabla') {

    $file = 'file1.php'

} else {

    $file = 'file2.php'

}

?>

 

<iframe src="<?php echo $file ?>" name="mainframe" height="600px" width="800px">

</iframe>

 

 

This way it works

 

<?php

$file = 'file.htm'

?>

<iframe src="<?php echo $file ?>" name="mainframe" height="600px" width="800px">

</iframe>

 

 

So when the """if ($bla == 'blabla')"""

It does not work

Link to comment
Share on other sites

I want to change this

"if ($two_letter_country_code == "IS")include('careframe.is.htm');

else include('careframe.en.htm');"

 

To This

"if ($two_letter_country_code == "IS")  """OPEN """careframe.is.htm""" IN IFRAME"""

AND

else """OPEN """careframe.en.htm""" IN IFRAME"""

 

 

"The code"

<?php

$IPaddress=$_SERVER['REMOTE_ADDR'];$two_letter_country_code=iptocountry($IPaddress);function iptocountry($ip) {$numbers = preg_split( "/\./", $ip);include("ip_files/".$numbers[0].".php");$code=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]);foreach($ranges as $key => $value){if($key<=$code){if($ranges[$key][0]>=$code){$two_letter_country_code=$ranges[$key][1];break;}}}

 

    if ($two_letter_country_code == "IS")include('careframe.is.htm');

    else include('careframe.en.htm');

}

?>

<body>

<td width="79%" align="center" valign="middle">

<center>

<iframe src="" name="mainframe" height="600px" width="800px">

</iframe>

</center>

</td>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.