Jump to content

How can I load multiple tabs from one form submit only using HTML and CSS?


OrigamiDave

Recommended Posts

Not sure if this the best forum for this, but here goes:

 

Background: I have an account with Smugmug.com They recently revamped their website. With this revamp, they no longer allow you to add your own Javascript to customize your page. They only allow HTML and CSS modifications. So I created a free website through awardspace that allows me to run JS and PHP scripts.

 

I want to create a way for a client to enter their last name and their password and have their pages opened in new tabs.

 

Question: How do I do this without javascript?

I can do it for a single page using PHP, but as far as I can tell PHP cant open multiple tabs...

 

Here's the HTML:

<form action="http://myfreescriptingsite.com/ClientSearch.php" method="get">
    Name: <input type="text" name="tName"><br>
    Password: <input type="password" name="tPassword"><br>
    <input type="submit">
</form> 

I control the ClientSearch.php file. This could also be an HTML page or a JS file...

 

Here is the ClientSearch.php file:

$name = strtolower($_GET["tName"]);
$password = $_GET["tPassword"];

switch($name){
    case "smitherton":
        if ($password == "password") {header("Location: http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2013");}
        break;
    default:
        header("Location: http://www.myrealwebsite.com/Client-Search/");
} 

Again, the above PHP code only works for one location. I need it to load up multiple pages:

if ($password == "password") {
    header("Location: http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2011");
    #header("Location: http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2012");
    #header("Location: http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2013");
} 

Any ideas on how to accomplish this?

Thanks,

Dave

Link to comment
Share on other sites

 

if ($password == "password") {
echo file_get_contents('http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2011');
echo file_get_contents('http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2012');
echo file_get_contents('http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2013');
} 
Link to comment
Share on other sites

I know you said without js, but here it is if needed that.

 

 

<script type="text/javascript">
function open_pages(){
window.open("http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2011");
window.open("http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2012");
window.open("http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2013");
}
</script>
 
<a href="javascript:open_pages()">View your pages</a>
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.