Jump to content

Recommended Posts

	<script language='javascript'> 
	var name = confirm("Are you sure you wish to purchase a <?=$conMan?> <?=$conNam?>?");
	if(name==true)
	{
		window.location.href='shop.php?prod_id=<?=$prod_id?>&confirm=1';
	}
	else
	{
		window.location.href='';
	}
</script>
<?
}

if(isset($_GET['prod_id']) && $_GET['confirm']==1) {

 

The last IF statement won't pass when it redirects, I honestly can't figure out why!

Link to comment
https://forums.phpfreaks.com/topic/135206-why-doesnt-this-redirect-work/
Share on other sites

If it's true it redirects and that's it.  Nothing else will be executed.

 

But if it's true, then it should go to the URL I put in with the $_GET attributes not the empty ELSE option...?

 

I thought you said it was redirecting...

 

But when it is true, it does redirect with the prod_id and confirm variables but doesn't initiate the next IF statement.
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.