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