Jump to content

Recommended Posts

Hi,

I have a problem with frames and php.

 

I have a page that has a bunch of frames inside it.

Inside one of those frames i have some php code that does stuff. However i want it to check if something exists inside the url of the main windows URL.

 

IE:

The main windows url = http://Moooooooo.com/login.html?ChangeMe|||||||||0|0|0||SomeWord|1|0

 

Then inside that main window is a frame with bla.html and some php code in it.

In blaa.html i want to look at the main URL and say, if it finds SomeWord inside that big url is prints one thing and if it doesnt it does something else.. Maybe if tru set $var = "1" else "0"

 

Sorta like lest say..

 

$var = "0";

if ($url of main window contains "SomeWord") {

          $var = "1";

          }else{

          $var = "0";

          }

 

 

Any ideas???

 

Thanks so much

Graham

try this:

 

<?php

$var1 = $_SERVER['QUERY_STRING'];
$lookN4="SomeWord"; // Word You Want To Search For

if (preg_match("/$lookN4/i", $var1)) 
{
echo "Query String Did Contain \"$lookN4\".";
}
else {
echo "Query String Did <b><u>Not</u></b> Contain \"$lookN4\".";
}

?>

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.