Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There appears to be multiple problems with your code that you posted. For starters as I stated above in a comment, I don't recognize the conditional comment <code>ite - 8</code>. Make sure that comment is correct and use <a href="http://www.quirksmode.org/css/condcom.html" rel="nofollow">this</a> site as a reference.</p> <p>In addition, you are trying to send input with no form. A div with a <code>class="form"</code> is not the same as an actual form. Inside <code>&lt;div class="form"&gt;</code> add the following:</p> <pre><code>&lt;form name="loginForm" id="loginForm" action="" method="post"&gt; </code></pre> <p>Fill in action with the page you are posting to.</p> <p>After this line: <code>&lt;i class="cbottom"&gt;&amp;nbsp;&lt;/i&gt;</code> add a closing form tag like so:</p> <pre><code>&lt;/form&gt; </code></pre> <p>Finally, change your button from <code>type="button"</code> to <code>type="submit"</code>.</p> <p>So to recap, check the conditional comment. This shouldn't stop your page from loading however. Your main problem was your lack of a form. When you try to submit inputs for posting you need to have a form. The form tells the page:</p> <ul> <li>the method to use when submitting your request <code>GET</code> or <code>POST</code></li> <li>and the page to post to in the <code>action=""</code> tag</li> </ul> <p>There are additional attributes that the form can provide but they aren't relevant to your login form.</p> <p>Finally, in order for a form to be posted to the respective page, a submit action has to be fired. Buttons can have a type of <code>button</code> or <code>submit</code>. If you use <code>type="button"</code> it is up to you to wire up an event to trigger when the button is clicked in the <code>onclick=""</code> attribute.</p> <p>For your purposes, you only need to submit your page and let the PHP do the rest. So for simplicity sake use <code>type="submit"</code> as it performs a submit of the page without you having to wire up an appropriate function.</p> <p>Try these things first and let me know if you are still having issues. Happy Coding!</p> <p><strong>EDIT (ADDITIONAL ERRORS):</strong></p> <p>Another error I see is that your input fields do not have name attributes. When a form is posted the name attributes are sent through the respective stream (GET or POST). If no names are attached to the inputs, they will not be added to the stream.</p> <p>It appears your PHP is expecting <code>$_POST['username']</code> for the username input so add:</p> <pre><code>name="username" </code></pre> <p>to your username input field. It also appears that your PHP is expecting <code>$_POST['password']</code> for the password field so add:</p> <pre><code>name="password" </code></pre> <p>to your password input. Also change the type on the password input from <code>text</code> to <code>password</code>. If you want the most basic of security and want anyone to join your site at least hide their password while they type it.</p> <p>I recommend you start researching HTML and PHP by either purchasing a book on the topic(s) or by visiting a site such as <a href="http://www.w3schools.com/" rel="nofollow">W3Schools</a> so you can learn and understand the basics of web design especially HTML as this is the base that you will be building on.</p>
 

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