Can anyone have a look at this code and tell me if it looks correct. I have been working at this for a long time and i still can't find what it wrong with it. everything seems to working well but when I run / debug the code, i get the errors:
Line 33 Undefined index: 127.0.0.1
Line 45 Undefined index: 127.0.0.1
Can anyone tell me where I have gone wrong to get such an error?
Thanks,
Emmanuel Okorie
<?php
// Grafikkaos.co.uk
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
$Item_keepURL="";
$Item_keepForm="";
$Item_keepBoth="";
$Item_keepNone="";
$Item_paramName = "";
$Item_Choice = "";
$Item_Choice_Next = "";
$Item_removeList = "";
$Item_removeList="&index=";
if (($Item_paramName!=""))
{
$Item_removeList=$Item_removeList."&".$Item_paramName."=";
}
// add the URL parameters to the Item_keepURL string
foreach ($HTTP_GET_VARS as $Item_Choice)
{
} echo "&" .$Item_Choice. "=";
if (((strpos(1, $Item_removeList,$Item_Choice_Next) ? strpos(1, $Item_removeList,$Item_Choice_Next) + 1 : 0)==0))
{
$Item_keepURL=$Item_keepURL.$Item_Choice_Next.rawurlencode($HTTP_GET_VARS[$Item_Choice]);
}
// add the Form variables to the Item_keepForm string
foreach ($HTTP_POST_VARS as $Item_Choice)
{
} echo "&".$Item_Choice."=";
if (((strpos(1,$Item_removeList,$Item_Choice_Next) ? strpos(1, $Item_removeList,$Item_Choice_Next) + 1 : 0)==0))
{
$Item_keepForm = $Item_keepForm.$Item_Choice_Next.rawurlencode($HTTP_POST_VARS[$Item_Choice]);
}
// create the Form + URL string and remove the intial '&' from each of the strings
$Item_keepBoth=$Item_keepURL.$Item_keepForm;
if (($Item_keepBoth!=""))
{
$Item_keepBoth=substr($Item_keepBoth,strlen($Item_keepBoth)-(strlen($Item_keepBoth)-1));
}
if (($Item_keepURL!=""))
{
$Item_keepURL=substr($Item_keepURL,strlen($Item_keepURL)-(strlen($Item_keepURL)-1));
}
if (($Item_keepForm!=""))
{
$Item_keepForm=substr($Item_keepForm,strlen($Item_keepForm)-(strlen($Item_keepForm)-1));
}
// a utility function used for adding additional parameters to these strings
function MM_joinChar($firstItem)
{
// global extract(GLOBALS);
if (($firstItem!=""))
{
$function_ret="&";
}
else
{
$function_ret="";
}
return $function_ret;
}
?>