Jump to content

Page reloads and opens a new tab on completion


TGWSE_GY

Recommended Posts

:facewall:I don't understand, when the submit button is clicked not only is the page reloaded but it is also opened in a new tab/window...... any ideas?

Here is my code:

<?php   <form action="process_changes.php" method="post">
<?php
	//Grab the section id string from the url.
	$section = $_GET['section'];

	//this sets up an assoc array that allows us to track what page we are editing for making sure that the current edits are being uploaded to the 
	//appropriate table in the db.
	$sectionid = array( "edit_news" => 0, "edit_radio" => 1, "edit_reviews" => 2);

	foreach ($sectionid as $key => $value) {
		//echo "key: " . $key . "value: " . $value . "<br />";
		if ($section == $key) {
			echo "<input type=\"hidden\" value=\"$value\" name=\"section\" id=\"section\" />";
		}
	}
?>
<?php

	//Reformat image tags so that the images will display in the editor
	include('phpcontent/contcond.php');
	$search = "src=\"images";
	$replace = "src=\"http://hmtotc.com/dev/projects/VRassoc/soundsurfer.biz/images";
	$article_edited = str_replace($search, $replace, $article);
	$article = $article_edited;


	$oFCKeditor = new FCKeditor('FCKeditor1') ;
	$oFCKeditor->ToolbarSet = 'Custom';
	$oFCKeditor->Width = '100%' ;
	$oFCKeditor->Height = '512' ;
	$oFCKeditor->BasePath = '' ;
	$oFCKeditor->Value = $article ;
	$oFCKeditor->Create() ;
?>
<input type="submit" value="Make Changes" />
</form>?>

 

Thanks

Hi TGWSE_GY,

 

Change:

 

<?php   <form action="process_changes.php" method="post">

 

to:

 

<form action="process_changes.php" method="post">

 

and:

 

<input type="submit" value="Make Changes" /></form>?>

 

to:

 

<input type="submit" value="Make Changes" /></form>

 

The <?php and ?> are not needed where you have placed them.

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.