PDA

View Full Version : Passing a PHP variable to Iframe Source Page


Rehanazher
02-24-2009, 01:02 AM
Hi,

am trying to show a page in a HTML <iframe> but before loading that page I want to set a variable value.
I tried following:

<iframe src="slgrid/ccustomer.php?id=" <? echo $cat; ?> "width="100%" height="100""></iframe>

but can not get the value of id using

$_GET['id']

Any other ideas are also welcome please.

I am a little new in PHP and HTML.

Any help in this regard will be appreciated.

Thanks and regards,

paul_norman_81
02-24-2009, 05:05 AM
You have closed your quotes too early...


<iframe src="slgrid/ccustomer.php?id=<?php echo $cat; ?>" width="100%" height="100"></iframe>


Hope it sorts your error. (If not, confirm that $cat is set!! - view source)