Current location: Hot Scripts Forums » Programming Languages » PHP » FCKeditor problem with php4

FCKeditor problem with php4

Reply
  #1 (permalink)  
Old 06-21-09, 02:11 AM
devphp12 devphp12 is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
FCKeditor problem with php4

Hi
m using FCKeditor for php4.X.X
when i submit form which have fckeditor , is redirect to my home page i.e. http://mydomainname.com

PHP Code:
<form id="form1" name="form1" method="post" action="">
<?php $sBasePath $_SERVER['PHP_SELF'] ;
$sBasePath substr$sBasePath0strpos$sBasePath"main/file1.php" ) )."fckeditor/";

$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath $sBasePath ;

if ( isset(
$_GET['Lang']) )
{
    
$oFCKeditor->Config['AutoDetectLanguage']    = false ;
    
$oFCKeditor->Config['DefaultLanguage']        = $_GET['Lang'] ;
}
else
{
    
$oFCKeditor->Config['AutoDetectLanguage']    = true ;
    
$oFCKeditor->Config['DefaultLanguage']        = 'en' ;
}

$oFCKeditor->Value =$detail ;
$oFCKeditor->Create() ;?>

<input type="submit" name="Submit1" value="     Save    "  />

</form>
on submit i just print print_r($_POST);
but it redirect to my home page

Thanx

Last edited by Nico; 06-22-09 at 05:55 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-22-09, 01:52 AM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 2,632
Thanks: 0
Thanked 15 Times in 15 Posts
I think your problem might be that you are leaving the action property in the form element blank.
Sometimes this can cause unexpected results, like going to your default page (ie: index.html or index.php)

HTML Code:
<form id="form1" name="form1" method="post" action="">
Try filling in the action property value with an "#" sign.
HTML Code:
<form id="form1" name="form1" method="post" action="#">
Or like this:
PHP Code:
<form id="form1" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
__________________
Jerry Broughton

Last edited by job0107; 06-22-09 at 02:04 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 06-22-09, 05:57 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 7,508
Thanks: 3
Thanked 11 Times in 11 Posts
Don't use PHP_SELF without filtering it first. It's vulnerable to XSS attacks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sub query / nested select error in php4 APuppyDog PHP 2 01-14-09 12:33 AM
Sessions in PHP4 mahmoud82 PHP 4 12-02-08 11:19 AM
Upgrading php4 to php5 Jay6390 Web Servers 3 05-08-08 08:14 AM
End of the road for PHP4 Christian PHP 6 08-06-07 05:01 AM
php4 & php5 Baho PHP 3 05-06-05 08:39 AM


All times are GMT -5. The time now is 12:52 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.