Jump to content

[SOLVED] can't get the if statement to do what i want


jeff5656

Recommended Posts

I have a page with a form.  To redirect back to the correct list i set the variable $so to be 'y':

 

case "editdc":
$icu='y';
$so = 'y';
break;

 

When I process the form, I use this:

 

$so = $_POST['so'];

 

and at the end I redirect (the point1 point 2 referr to which submit button was pressed):

 

if(isset($_POST['point1']))
{
header("Location: editdos.php?action=edit&id=".$pt_id);
}
if(isset($_POST['point2']))
{
	if ($so='y')
	{
	header("Location: displaysignoff-bill.php");
	}
else	
	{
	header("Location: billview.php");
	}
}
if(isset($_POST['point3']))
{
header("Location: editdos_cs.php?action=consults&id=".$pt_id);
}
if(isset($_POST['point4']))
{
header("Location: ../../wb/cs/displayactive.php");
}

 

For point2, the problem is even when $so is NOT "y",  it STILL goes to Location: displaysignoff-bill.php.

 

It does not go to billview.php.  Any ideas?  I hope I asked the question in a way that doesn't confuse everyone.

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.