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

Link to comment
Share on other sites

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.

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.