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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.