I have a page with just the following code in it:
<?php
if ($_COOKIE['company'] == 'HC')
{
header('Location: subscribeto_hc.php');
}
elseif ($_COOKIE['company'] == 'SVC')
{
header('Location: subscribeto_svc.php');
}
else
{
header('Location: subscribeto_sti.php');
}
?>
When I bring up this page I get errors like so:
Notice: Undefined index: company in C:\Accounts\stiesaco\ on line 2
Notice: Undefined index: company in C:\Accounts\stiesaco\ on line 6
Warning: Cannot modify header information - headers already sent by (output started at C:\Accounts\stiesaco\ in C:\Accounts\stiesaco\ on line 12
Very green at PHP, can someone direct me to the proper code syntax to make this work?
<?php
if ($_COOKIE['company'] == 'HC')
{
header('Location: subscribeto_hc.php');
}
elseif ($_COOKIE['company'] == 'SVC')
{
header('Location: subscribeto_svc.php');
}
else
{
header('Location: subscribeto_sti.php');
}
?>
When I bring up this page I get errors like so:
Notice: Undefined index: company in C:\Accounts\stiesaco\ on line 2
Notice: Undefined index: company in C:\Accounts\stiesaco\ on line 6
Warning: Cannot modify header information - headers already sent by (output started at C:\Accounts\stiesaco\ in C:\Accounts\stiesaco\ on line 12
Very green at PHP, can someone direct me to the proper code syntax to make this work?