0

I am having problem with my php code. Directory and its code is working fine when direct accessing

For example subdomain.domain.com/folder_name_c/index.php?id=1

but when I use header() function to redirect to that directory it generates error. [an error occurred while processing this directive]

Here is the code that I am using.

if($_POST){

    if($_POST['xyz'] != '' && $_POST['xyz2'] != ''){
        header("Location http://subdomain.domain.com/folder_name_c/index.php?id=".$_POST['comp']."&xyz=".$_POST['xyz']."&xyz2=".$_POST['xyz2']);
    }else if($_POST['month'] != ''){
        header("Location http://subdomain.domain.com/folder_name_c/index.php?id=".$_POST['comp']."&xyz=".$_POST['xyz']);
    }

}

Help will be appreciate.

Kevin Workman
  • 41,537
  • 9
  • 68
  • 107
Auj
  • 109
  • 2
  • 9

1 Answers1

0

I think the problem is in

header("Location: ...

you need a colon after Location

angel.bonev
  • 2,154
  • 3
  • 20
  • 30