Skip to main content

Posts

Showing posts from January, 2018

External Page Submission/Submission to another page

Tutorial Title:   External Page Submission/Submission to another page Course: PHP Instructor: Muhammad Samim 1. Submitting action from one page to another page 2. First make one page with name page1.php <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <title>Document</title> </head> <body>      <form action="page2.php" method="post"> //It will direct from page1.php to page2.php           <br><input type="text" placeholder="Email" name="anyNameForEmail">     <br><input type="password" placeholder="Password" name="anyNameForPassword">     <br><input type="submit" name="click">    </form>   </body> </html> 3. Second make another file with name page2.php <?php if(isset($_POST["click"])){     $anyNameO...

Validating The Form Values

Tutorial Title:  Validating The Form Values Course: PHP Instructor: Muhammad Samim 1. Understanding of Different Validation <?php if(isset($_POST["click"])){     $anyNameOfVariableForUserName = $_POST["anyNameForEmail"];     $anyNameOfVariableForPassword = $_POST["anyNameForPassword"];     $validEmail  = array("Muhammad","Samim","Akhtar","Akbar"); //Array of valid names     $minimum = 3;     $maximum = 15;     if (strlen($anyNameOfVariableForUserName) < $minimum) //strlen will check the length of the string     {         echo "Email Error: Minimum characters are 5";     }       elseif (strlen($anyNameOfVariableForUserName) > $maximum) //strlen will check the length of the string     {         echo "<br>Email Error: Maximum characters are 12";     }     else {     ...

Extracting Information from form

Tutorial Title:  Extracting Information from form Course: PHP Instructor: Muhammad Samim 1. <?php if(isset($_POST["anyName"])) { $anyNameOfVariableForEmail = $_POST["anyNameForEmail"]; //Now because of it email must be typed otherwise it will not work $anyNameOfVariableForPassword = $_POST["anyNameForPassord"];//Now because of it password must be typed otherwise it will not work echo $anyNameOfVariableForEmail; //It will display the email echo $anyNameOfVariableForPassword; //It will display the password } ?> <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <title>Document</title> </head> <body>      <form action="21form.php" method="post">        <input type="text" placeholder="Email" name="anyNameForEmail">        <input type="password" placeholder="...