EasyUI Forum
May 01, 2024, 01:45:27 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: problem Location: .php  (Read 5344 times)
slavok47
Newbie
*
Posts: 7


View Profile Email
« on: May 18, 2015, 02:20:21 AM »

Hello everyone!
please tell me how to perform a redirect to the page condition

example:
Code:
function submitForm(){
            $('#ff').form({
    url:'.php',
    onSubmit: function(param){
        param.p1 = 'submit';       
    },
    success:function(data){
        $.messager.alert('Error',data,'error');
    }
});
// submit the form
$('#ff').submit();
        }

end PHP

Code:
if {
header("Location: index.php"); exit();   
}
else
{
echo <<<INFO
Error
INFO;
}

in this form, a page in a message box
Logged
yamilbracho
Jr. Member
**
Posts: 64


View Profile Email
« Reply #1 on: May 18, 2015, 02:20:06 PM »

try
if {
ob_clean();
header("Location: index.php");
exit();   
} else {
echo <<<INFO
Error
INFO;
}
Logged
slavok47
Newbie
*
Posts: 7


View Profile Email
« Reply #2 on: May 19, 2015, 04:45:57 AM »

unfortunately it does not help, call forwarding is still in a message box
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!