Jump to content

[SOLVED] how can I get to open a new page on a new window


oceans

Recommended Posts

Thank you,

 

I have to mention, I am sending a value from a "php" variable (processed) in this page the to next page. Thus do you think Javascript will help me port this value as well to next page if I use it.

 

Currently my pages works good, I just want the next page to be on its own with this ported value to be further worked on over there.

 

Thanks.

Link to comment
Share on other sites

Thank you,

 

I have to mention, I am sending a value from a "php" variable (processed) in this page the to next page. Thus do you think Javascript will help me port this value as well to next page if I use it.

 

Currently my pages works good, I just want the next page to be on its own with this ported value to be further worked on over there.

 

Thanks.

 

Have you done any research?  Surely you have heard of the $_GET method, I mean you have a decent amount of posts...  You have to tack it onto the end of the URL.

 

$s = "hit";
?>
Google

 

I already know the next question...

 

You retrieve it on the next page by doing:

 

$ported_var = $_GET['var1'];

Link to comment
Share on other sites

Maq,

 

You missunderstood me, presently I am using

header('location: View.php?ID='.$InputFromScreen[1]);

I placed this statement in a if condition, if somthing happens go there, if not stay in here.

yes I grab the value as you mention,

but this time I want the next page to open in a brand new window.

Please advise.

Link to comment
Share on other sites

I tried this, not working, but I think I am close, can you assist.

the problem is getting javascript to send my php variable's value, if this is done, i am ok with your suggested java pop up

 

<?PHP
.
.
.

?>
		<script type="text/javascript">
		window.open("http://localhost/Product/View.php?ID="</script> <?PHP echo $InputFromScreen[1]); ?> <script type="text/javascript">);
		//header('location: View.php?ID='.$InputFromScreen[1]);

		</script>
<?PHP
.
.
.
?>

Link to comment
Share on other sites

I tried this, not working, but I think I am close, can you assist.

the problem is getting javascript to send my php variable's value, if this is done, i am ok with your suggested java pop up

 

<?PHP
.
.
.

?>
		<script type="text/javascript">
		window.open("http://localhost/Product/View.php?ID="</script> <?PHP echo $InputFromScreen[1]); ?> <script type="text/javascript">);
		//header('location: View.php?ID='.$InputFromScreen[1]);

		</script>
<?PHP
.
.
.
?>

 

 

That code isn't valid.

 

Write it like you would write normal JS, and then go back and add the PHP part.  It will probably be easier that way.

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.