Jump to content

the iframe does not display the updated data


fekaduw

Recommended Posts

i have an iframe that will allow users to type and edit texts like a text editor. When i try to add some data, it works fine. but the iframe does not update itself when i try to view the data inserted. it displays an old data that has been there before the update. Here is the code for the iframe:

 

<script language="javascript">
//Create an iframe and turn on the design mode for it
document.write ('<iframe src="message2.php?id=<?php echo($vid); ?>" id="message" width="440" height="220" name="mess1"></iframe>')
frames.message.document.designMode = "On";
</script>

 

the content of message2.php is:

<?php 
require("../includes/dbconn.php");

    if(isset($_GET["id"]))
{
  		$vid=$_GET["id"]; 
}
else
{
  		$vid=NULL;
}

if(($vid!="")&&($vid!=0))
{
	$SQL="select * from tblhome where topicid=".$vid;
	$result=mysql_query($SQL);
	$row=mysql_fetch_array($result);
  	$vdesc=$row["Description"];  
}
else
    $vdesc=""; 

            echo $vdesc;
?>

 

What could be the problem? any help is highly appreciated. thanks

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.