{php login homeword}

Posted in CategoryGeneral Discussion
  • Cassidy Joyner 7 months ago

    All the coding experts know that they are using some trick which will help them to keep saving their code and mane a stunning website. They help form the dissertation help so that they will using the link and try to develop a great project.

  • Terry Ogbemudia 3 years ago

    Great. later on you will need to separate the PHP code from the HTML.

  • Alaa 3 years ago

    contact form











        $form_errors = array();


        $required_fields = array('username','email','message');


        $form_errors = array_merge($form_errors,check_empty_fields($required_fields));


        $form_errors = array_merge($form_errors,check_email($_POST));




            $user = $_POST['username'];


            $email = $_POST['email'];


            $message = $_POST['message'];




                $sqlInsert = "INSERT INTO feedback (sender_name,sender_email,message,send_date) VALUES(:username,:email,:message,now())";


                $statement = $db->prepare($sqlInsert);




                $result = flashmessage("your feedback is sent thanks for coorpiration.","pass");

            }catch(PDOException $ex){


                echo "sorry, something wrong happened while saving ".$ex->getMessage();




        }else if(count($form_errors)==1){


            $result = flashmessage("There is an error in one of the required fields please check and try again.");




            $result = flashmessage("There are ".count($form_errors)." errors in the required fields please check and try again.");






    <!DOCTYPE html>






            <meta charset="utf-8">


            <title>Contact Page</title>






            <div style="border:1px solid gray">


                <h2>Authintication System</h2>




                <h3>Contact Form</h3>



                        <?php if(isset($result)) echo $result;?>


                        <?php if(!empty($form_errors)) {echo show_errors($form_errors); echo"</div>";}?>


                    <div class="clearfix"></div>


                <form method="post">




                        <tr><td>username: </td><td><input type="text" name="username" value=""></td></tr>


                        <tr><td>email: </td><td><input type="text" name="email" value=""></td></tr>


                        <tr><td>message:</td><td><textarea name="message" cols="40" rows="5"></textarea> </td></tr>


                        <tr><td></td><td><input type="submit" name="feedbackBtn" value="Send" style="float:right"></td></tr>





                    <p><a href="../index.php">Back</a></p>










Please login or register to leave a response.