jason1987 Posted October 17, 2007 Share Posted October 17, 2007 I keep getting the undefined index error on the bottom two rows of my code simparent and equtype - the other two work fine yet there is no difference in my code. equtypeid is even from the same table as the top two $equid=$HTTP_POST_VARS['equid']; $fromuserid=$HTTP_POST_VARS['fromuserid']; $simparent=$HTTP_POST_VARS['simparentid']; $equtype=$HTTP_POST_VARS['equtypeid']; these are then used in an if statement if ($simparent == !'Null') { if($equtype == '8') { $simins = "UPDATE itsiminfo SET simparentid=NULL WHERE itsiminfo.equid='$equid'"; echo $simins; //$resultsimins = mysql_query($simins); // Removes link between sim card and mobile/3G - only from SIM though not via mobile or 3G } if($equtype == '7' || '4') { $simins2 = "UPDATE itsiminfo SET simparentid=NULL WHERE simparentid='$equid'"; $resultsimins2 = mysql_query($simins2); //Removes link between Mobile/3g and sim - from through mobile or 3g } } anyone help?? Link to comment https://forums.phpfreaks.com/topic/73617-undefined-index/ Share on other sites More sharing options...
~n[EO]n~ Posted October 17, 2007 Share Posted October 17, 2007 use this $equid=$HTTP_POST_VARS['equid']; $fromuserid=$HTTP_POST_VARS['fromuserid']; $simparent=@$HTTP_POST_VARS['simparentid']; $equtype=@$HTTP_POST_VARS['equtypeid']; isin't HTTP_POST_VARS deprecated ??? ??? ??? Link to comment https://forums.phpfreaks.com/topic/73617-undefined-index/#findComment-371403 Share on other sites More sharing options...
jason1987 Posted October 17, 2007 Author Share Posted October 17, 2007 I dont know, Im a bit of newbie at php - i was just carrying on with the current way we have things Link to comment https://forums.phpfreaks.com/topic/73617-undefined-index/#findComment-371416 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.