Can anybody tell me what is wrong with this code? I have tried to figure out what is wron with it but still no chance with it at all.
------------------------------------------------------------------------------------------------------------------------------------------------------------------
// 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,1) ? strpos(1,$Item_removeList,$Item_Choice_Next,1) + 1 : 0)==0)) // Help me with code on this line -------------
{
$Item_keepURL=$Item_keepURL.$Item_Choice_Next.rawurlencode($HTTP_GET_VARS[$Item_Choice]); // Help me with code on this line -------------
}
--------------------
Every time I run this code, it says:
&127.0.0.1=<br />
<b>Warning</b>: Wrong parameter count for strpos() in <b>D:\Documents and Settings\Emmanuel Okorie\My Documents\related_page_dwmx.php</b> on line <b>26</b><br />
and I get Undefined index 127.0.0.1
Can anyone out there help?
Thanks
Emmanuel Okorie
Code Problem - Urgent Help Needed!!!!
Moderator: General Moderators
Emmanuel, if you ever want a response from a bulletin board or email list, you should not ask for urgent help. If you would like, many of us are available for very reasonable hourly rates. Anyway, I'll help you by putting a quotation from the manual here:
and a quote from your code:int strpos ( string haystack, string needle [, int offset])
See the difference? the error message tells you exactly what's happening - you're sending four arguments to a function that only takes three.strpos(1,$Item_removeList,$Item_Choice_Next,1)
LOL
I do that thing all the time LOL I get confused