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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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