Jump to content

Inline frame And $_REQUEST Variable


phpmash

Recommended Posts

When click on a particular category, the corresponding products need to be opened in new window with file name products.php (Link will be http://mysite.com/products.php?catname=cat1).

In this template products will be listed in an inline frame which loads the php file listproducts.php.

In listproducts.php the $_REQUSET['catname'] is not available.

How can I get the catname in to inline frame php page

:)

Link to comment
Share on other sites

My code is like as follows:

 

$url="products.php?cat=$row[0]";

<?php echo "<a href=\"$url\" target=\"mlist\">.$row[0]."</a>"; ?>

 

Here "mlist" is the name of iframe used in "products.php"

This frame loads the php file "listproducts.php".

In listproducts.php I have the query like

SELECT * FROM products WHERE category='$catname'

$catname needs to be passed from previous page

 

Still the problem exists

 

Link to comment
Share on other sites

Yeah, if you are using the iframe to call the page it is not included as part of the current page or script.

You should be setting the iframe and then using include() to bring in products.php, which should be able to process it properly.

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.