Note that there are some explanatory texts on larger screens.

plurals
  1. POSimple PHP Form Redirect
    primarykey
    data
    text
    <p>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.</p> <p>I have constructed the following after some googling:</p> <pre><code>&lt;?php if($_SERVER['REQUEST_METHOD'] == 'POST') : $siteid1 = $_POST['siteid1']; header('Location: http://' . $siteid1 . '/ndxz-studio/'); else:?&gt; &lt;form action="&lt;?php echo $_SERVER['../PHP_SELF']; ?&gt;" method="post"&gt; &lt;h3&gt;Indexhibit&lt;/h3&gt; &lt;p class='formp'&gt;If your website is powered by &lt;em&gt;Indexhibit&lt;/em&gt; submit your URL to be forwarded to your admin area&lt;/p&gt; &lt;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" /&gt; &lt;input class="btn btn-success loginbuttons" type="submit" value="Go" /&gt; &lt;/form&gt; &lt;?php endif; ?&gt; </code></pre> <p>And then the same again directly beneath it for Wordpress. </p> <p>However because I am using </p> <pre><code>&lt;?php if($_SERVER['REQUEST_METHOD'] == 'POST') : $siteid1 = $_POST['siteid1']; header('Location: http://' . $siteid1 . '/ndxz-studio/'); else:?&gt; </code></pre> <p>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)</p> <p>PHP is not my forte so apologies I have committed any stupid mistakes</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload