Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Simply do something like this: (nothing to do with CSS)</p> <pre><code>&lt;?php // login.php if(strtolower($_GET['v']) == 'signup'){ ?&gt; &lt;form&gt;/* sign up form goes here */&lt;/form&gt; &lt;?php }else{ ?&gt; &lt;form&gt;/* login form goes here */&lt;/form&gt; &lt;?php } ?&gt; </code></pre> <p>Or you could have used the switch/select if you have too many pages in one php file:</p> <pre><code>&lt;?php // login.php switch(strtolower($_GET['v'])){ case 'signup': ?&gt; &lt;form&gt;/* sign up form goes here */&lt;/form&gt; &lt;?php break; default: ?&gt; &lt;form&gt;/* login form goes here */&lt;/form&gt; &lt;?php break; } ?&gt; </code></pre> <p>Cheerio!</p> <p><strong>UPDATE</strong>: with regards to ability to use AJAX, you can do something like this:</p> <pre><code>&lt;?php // login.php $_showcontent = false; if(isset($_GET['c'])){$_showcontent = true;} if(!$_showcontent){ // load the header, javascript components and whatever so on echo '&lt;div id="view"&gt;'; } switch(strtolower($_GET['v'])){ case 'signupstep1': ?&gt; &lt;a href="#view" onclick="return go_step2();"&gt;Step 2&lt;/a&gt; &lt;?php break; case 'signupstep2': ?&gt; &lt;form&gt;/* sign up form goes here */&lt;/form&gt; &lt;?php break; case 'signupcomplete': ?&gt; /* sign up complete page */ &lt;?php break; default: ?&gt; &lt;a href="#view" onclick="return go_signup();"&gt;&lt;/a&gt; &lt;?php break; } if(!$_showcontent){ echo '&lt;/div&gt;'; // footer and what other stuff you need here } ?&gt; </code></pre> <p>The Javascript code:</p> <pre><code>&lt;script type="text/javascript"&gt; /* &lt;![CDATA[ */ function go_signup(){ $("#view").load("&lt;?php echo $_SERVER['PHP_SELF'] ?&gt;?c&amp;v=signupstep1"); return false; } function go_step2(){ $("#view").load("&lt;?php echo $_SERVER['PHP_SELF'] ?&gt;?c&amp;v=signupstep2"); return false; } /* ]]&gt; */&lt;/script&gt; </code></pre>
 

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