Jump to content

Displaying iframe values


Nandini

Recommended Posts

Hi i want to display my iframe input values after click on submit button. But i did not get iframe values. Here is my code.

 

<? require_once('db_connect.php'); ?>

<form action="save.php" method="post" name="frm">

<input type="name=" name="first">

<iframe src="frame.php" width="100%" class="iframe_body" marginheight="0" marginwidth="0"></iframe>

<input type="submit" name="submit" value="submit" >

<form>

 

frame.php

<? require_once('db_connect.php'); ?>

<input type="text" name="age">

<input type="text" name="city">

 

save.php

<?

require_once('db_connect.php');

?>

your posted values are:

Name:<? echo $_POST['first'] ; ?><br>

Age:<? echo $_POST['age'] ; ?><br>

City:<? echo $_POST['city'] ; ?>

 

Cany any one help me out

Link to comment
https://forums.phpfreaks.com/topic/155483-displaying-iframe-values/
Share on other sites

An iframe is not like an include, it is a separate and independent web page displayed within another web page

 

What you have is a form with no fields but with a submit button in your main page, therefore there is no data to pass to save.php.

 

Why are you trying to use an iframe for this anyway? why not simply use a proper form within the main page?

Archived

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

×
×
  • 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.