Jump to content

Undefined Index


jason1987

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.