Hi guys,
Our Web provider has recently done an upgrade to php 5 and as a result pages that were working fine before have suddenly stopped working properly and any buttons that you can click on are throwing out errors on the page.
Here is the code for the related error on one such page and the error it produces.
if ($_POST['editSitebutton']){
$siteIdNo = $HTTP_POST_VARS['siteSelect'];
$_SESSION['siteID'] = $siteIdNo;
header('Location: siteadmin2.php');
}
if ($_POST['deleteSiteButton']){
$siteIdNo = $HTTP_POST_VARS['siteSelect'];
$deleteQuery = "DELETE FROM sitelist WHERE id = '$siteIdNo'";
if ($result = $connector->query($deleteQuery)){
echo ('<center><b>Site has been removed from the online site list!!!</b></center><br>');
}else{
exit('<center>Sorry, There was an error removing a site from the online site list!!!</center>');
}
}
if ($_POST['addSiteButton']){
$_SESSION['siteID'] = "";
header('Location: siteadmin2.php');
}
And the error messages I recieve are as follows:
Notice: Undefined index: editSitebutton in E:\domains\d\deacom.co.uk\user\htdocs\CMS\cmsadmin\siteadmin1.php on line 21
Notice: Undefined index: deleteSiteButton in E:\domains\d\deacom.co.uk\user\htdocs\CMS\cmsadmin\siteadmin1.php on line 27
Notice: Undefined index: addSiteButton in E:\domains\d\deacom.co.uk\user\htdocs\CMS\cmsadmin\siteadmin1.php on line 38
I'm sure I've seen a solution to this kind of problem in the past but I can't seem to find it again.
Thanks for any help you can provide!!
Dave