|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Help me with this code!!!
Can anyone have a look at this code and tell me if it looks correct. I have been working on 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.rawu rlencode($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($HTT P_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_ke epURL)-(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; } ?> |
|
#2
|
|||||
|
|||||
|
RE: Help me with this code!!!
Look at the foreach loops for starters, perhaps you wanted the line below them to actually be inside them?
php Code:
Cheers, Keith. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Help me with this code!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|