Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>you don't have check any var is set so you can see more php error</p> <p>i change more check, you can try</p> <pre><code>&lt;html&gt; &lt;h4&gt; &lt;center&gt; New User Registration &lt;/center&gt; &lt;/h4&gt; &lt;body&gt; &lt;?php $errEmail = ""; $errUser = ""; $errPass = ""; //not too sure what this if statement suppose to be. if(isset($_POST["register"])){//1. no '{' 2. the post is not ckeck 'type', is 'name' // Email mask if(preg_match("/^[a-zA-Z]\w+(\.\w+)*\@\w+(\.[0-9a-zA-Z]+)*\.[a-zA-Z]{2,4}$/", $_POST["email"]) === 0) $errEmail = '&lt;p class="errText"&gt;Email must comply with this mask: chars(.chars)@chars(.chars).chars(2-4)&lt;/p&gt;'; // User must be digits and letters if(preg_match("/^[0-9a-zA-Z_]{5,}$/", $_POST["user"]) === 0) $errUser = '&lt;p class="errText"&gt;User must be bigger that 5 chars and contain only digits, letters and underscore&lt;/p&gt;'; // Password must be strong //if(preg_match("/^.*(?=.{8,})(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).*$/", $_POST["pass"]) === 0) if(preg_match("/^.*(?=.{8,})(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).*$/", $_POST["pass"]) === 0) $errPass = '&lt;p class="errText"&gt;Password must be at least 8 characters and must contain at least one lower case letter, one upper case letter and one digit&lt;/p&gt;'; } ?&gt; &lt;form method="post"&gt; &lt;center&gt; &lt;table width="300" border="0" align="center" cellpadding="0" cellspacing="1"&gt; &lt;tr&gt; &lt;td&gt;Username&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td &gt;&lt;input name="user" type="text" size="16" value="&lt;?php echo (isset($_POST["user"]))?$_POST["user"]:'';/*3.no check the var is set?*/ ?&gt;"&gt; &lt;?php if(isset($errUser) and $errUser !='') echo $errUser; ?&gt; &lt;/td &gt;&lt;!--4. no '&lt;/td&gt;'--&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td&gt;&lt;input name="pass" type="password" size="16" value="&lt;?php echo (isset($_POST["pass"]))?$_POST["pass"]:''; ?&gt;"&gt; &lt;?php if(isset($errPass) and $errPass !='') echo $errPass; ?&gt; &lt;/td &gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Email&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td&gt;&lt;input name="email" type="text" size="50" value="&lt;?php echo (isset($_POST["email"]))?$_POST["email"]:''; ?&gt;"&gt; &lt;?php if(isset($errEmail) and $errEmail !='') echo $errEmail; ?&gt; &lt;/td &gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;input type='submit' name='register' value='Register'&gt; &lt;/center&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    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