<form action="<?php if(isset($redirect)&& $redirect == "f"){echo "#";}
else{ ?>add_new_item2.php?user_id=<?php echo $_GET['user_id']; }?>" method="post">
//no need to expose this area here
<input type="submit" value="submit" name="submit" />
</form>
//the processor
<?php
if(isset($_POST['submit']))
{
$redirect = "f";
if(whatever)
{
//the if condition comes here
}
else //all if conditions are satisfied
{
$redirect = "t";
}
}
What i want to do is simple in the form action i want the action to be action=”#” if the if conditions are not yet met and if they are met the action will be action=”add_new_item2.php?user_id=123″
try this