Jump to content

Update record goto iframe


mrt003003

Recommended Posts

Hi there i have webpages that are viewed through an iframe on my index page. Ive just added an update form on the index page itself and on redirection it doesnt go to the page within the iframe anymore, just the page itself.

 

  <iframe src="../swb/main2.php" width="80%" height="800"> </iframe> 

 

The update code is:

 <?php $editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
  $updateSQL = sprintf("UPDATE player SET Repair=%s WHERE PlayerName=%s",
                       GetSQLValueString($_POST['repair'], "int"),
                       GetSQLValueString($_POST['player'], "text"));

  mysql_select_db($database_swb, $swb);
  $Result1 = mysql_query($updateSQL, $swb) or die(mysql_error());

  $updateGoTo = "repairs.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    $updateGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $updateGoTo));
} ?>

 

So maybe i can this line:  $updateGoTo = "repairs.php"; to something like  $updateGoTo = "repairs.php target='iframe src="../swb/repairs.php'";

 

Is this possible??

 

Thanks :)

Link to comment
https://forums.phpfreaks.com/topic/235458-update-record-goto-iframe/
Share on other sites

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.