how can i access values returned by another php script into iframe.
how can i access values from iframe in php
Please clarify.
you can open pages in iframes by setting the target in your href so you could probably so something along the lines of
MAIN PAGE
<?php
$value = "123321";
?>
<href="page.php?value=<? echo $value; ?>" target="iframe_name"><?php echo $value; ?></a>
WITHIN FRAME
<?php
$value = $_GET['value'];
echo $value;
?>
not sure if this is what you mean... but your question is very vague
I mean.
I have got iframe in my php form which gets me the result of last record in table format.
For eg. I get this result in my iframe
Product Name Qty price totalprice dealer
Laptop 2 1000 2000 xyz
now my question is how can i get the value of this result in my php (main form in which i have my iframe).
For eg. i want to access the qty (i.e. 2 in iframe or productname i.e Laptop etc). so i want to access this value and display it in the textbox of my mainform.
Thanks
php is server side so no way to do this without reloading the page. If you dont want to do that then look into Javascript.
obviously i am using javascript, do you know the way to do it.
If you're using Javascript to do it, why are you asking in a PHP forum?
I am asking here because i want access to this variable in my php script.
it doesnt work that way... you cant interact with javascript and php. you will need to use js to change the field value. then submit the form to access the php.
php = serverside
javascript = clientside
so you must work like this
Server (PHP) serves the page
Client machine allows you to manipulate the values (JS)
Server (PHP) uses those value AFTER submit