Jump to content

$_GET for iframe?


kanala

Recommended Posts

Not sure what you mean, but if you want an iFrame to show a page designated by the url or w/e this could be what you mean:

Your link:<a href="index.php?id=page.htm"On your index page, here is (part of) the iframe tag:<iframe ..... src="<?php echo $_GET['id']; ?>">That will set the iframe's src to "page.htm"

Link to comment
Share on other sites

Not sure what you mean, but if you want an iFrame to show a page designated by the url or w/e this could be what you mean:
Your link:<a href="index.php?id=page.htm"On your wheels page, here is (part of) the iframe tag:<iframe ..... src="<?php echo $_GET['id']; ?>">That will set the iframe's src to "page.htm"

No that's not what I mean. What I mean is when using PHP to make a query to a mysql database, I have to use the ?id in the URL e.g. icegifts.com?id=5, to look up the database with. But the query is being done inside an iframe, which means icegifts.com?id=5 does not actually show up in the address bar, so I can't use $_GET to retrieve it. The URL of the iframe is hidden. I want to know how to actually retrieve the URL of the iframe, to find its 'id'.
Link to comment
Share on other sites

No that's not what I mean. What I mean is when using PHP to make a query to a mysql database, I have to use the ?id in the URL e.g. icegifts.com?id=5, to look up the database with. But the query is being done inside an iframe, which means icegifts.com?id=5 does not actually show up in the address bar, so I can't use $_GET to retrieve it. The URL of the iframe is hidden. I want to know how to actually retrieve the URL of the iframe, to find its 'id'.
I'm getting this error everytime:Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/icegifts.awardspace.com/product.php on line 15
Link to comment
Share on other sites

Please post your code. Are you saying that the parent page has access to the ID and you need to also give the iframe access to the same ID? Or are you saying you need the parent page to have access to the ID that is going to the iframe?That error just means that the SQL query failed, probably because there's no ID.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...