Jump to content

Redirect


june_c21

Recommended Posts

I think what you want is an HTML hyperlink, which you don't need PHP for:

 

<a href="index1.htm" target="_blank">click here</a>

 

If for some reason you need PHP to open a new window--you could print javascript to the screen that opens a new window.

 

Tell me if either is your intention and I'll try to build on a more specific response.

Link to comment
Share on other sites

i wrote the file in php format. after user login correctly, it will redirect them to another page but the new page will be pop up.

i try echo "<a href='index1.htm' target='_blank'></a>";  OR  "<a href="index1.htm" target="_blank"></a>";      but it don't work.

Link to comment
Share on other sites

Oh I see, then you can do this.

 

On the login form, you can add the target attribute to the form itself:

 

<form action="login.php" [b]target="_blank"[/b]>
...

 

and on login.php, after logging the user in, you do as you did before:

 


header('location: index1.htm');
exit;

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.