Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7871617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:57:37+00:00 2026-06-03T01:57:37+00:00

I do a few websites for clients using either Indexhibit or WordPress. I keep

  • 0

I do a few websites for clients using either Indexhibit or WordPress. I keep getting the same ‘where do I login?’ email from them so want to create a simple forward form on my site where a client can enter there URL, select either WordPress/Indexhibit and click go and be forwarded on to there site.

I have constructed the following after some googling:

<?php if($_SERVER['REQUEST_METHOD'] == 'POST') : $siteid1 = $_POST['siteid1'];             header('Location: http://' . $siteid1 . '/ndxz-studio/'); else:?>
<form action="<?php echo $_SERVER['../PHP_SELF']; ?>" method="post">
<h3>Indexhibit</h3>
<p class='formp'>If your website is powered by <em>Indexhibit</em> submit your URL to be forwarded to your admin area</p>
<input  input class='loginforms' type="text"  value='i.e. your-domain-name.com' onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'i.e. your-domain-name.com':this.value;"   name="siteid1" />
<input class="btn btn-success loginbuttons" type="submit" value="Go" />
</form>
<?php endif; ?> 

And then the same again directly beneath it for WordPress.

However because I am using

<?php if($_SERVER['REQUEST_METHOD'] == 'POST') : $siteid1 = $_POST['siteid1'];             header('Location: http://' . $siteid1 . '/ndxz-studio/'); else:?>

It only seems to take accept one form on the site. (so either indexhibit fails to go to /ndxz-studio or wp fails to go to wp-admin)

PHP is not my forte so apologies I have committed any stupid mistakes

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:57:38+00:00Added an answer on June 3, 2026 at 1:57 am

    It’s because of this:

    <?php if($_SERVER['REQUEST_METHOD'] == 'POST') : $siteid1 = $_POST['siteid1']; 
    

    this is always true in your form. So, PHP executes it. PHP never reaches the second if statement, so it never executes.

    Try an if else statement and make sure your form names are unique

    EDIT:

    here is some sample code to get you started.

    if($_POST['siteid1']) {
        $siteid1 = $_POST['siteid1']; 
        // execute code here
    } elseif($_POST['siteid2']) {
        $siteid1 = $_POST['siteid1'];
        // Execute code here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented few payment websites using PayPal Standard, PayPal Website Pro, PayPal Express
A few clients have asked to make some static websites because their hosting doesn't
I read a few websites and questions but all were far beyond my level
Greetings, I have a few applications/websites running with LINQ to SQL and the other
I have a few classes in my current project where validation of Email/Website addresses
I'd like to write a new website from scratch. I'll be using PHP for
I am currently looking at changing from using css to LESS in my current
I am currently developing a SSO website-network. It has a few websites wich are
I am using linux cpanel shared hosting. Am using http://aaa.com/script.php to scrape data from
I am building a scrolling website using JQuery localscroll, building on a few demo's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.