Please find some interesting Code Snippets or CSS-Tricks that could help the software developers or the front-end designers some how.

Articles PHP Feed Back Form

It is nice to meet you again in the Feed Back Form development through the following codes, and the Feed Back Form consists of two main pages. The first page is the HTML form while the second page is the PHP, ASP or JSP page where the second page has to receive the sent data and send it again to the Email address. Let us first start with the HTML form page.

1- HTML Form Page:

<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title> Form Page</title>
<form action="send.php" method="POST">
First Name: <input type="text" name="first" value="">
Last Name: <input type="text" name="last" value="">
Mobile: <input type="text" name="mobile" value="">
Country: <input type="text" name="country" value="">
Email: <input type="text" name="email" value="">
Body: <textarea cols="40" rows="8" name="body"></textarea>
<input type="submit" name="" value="SEND">

2- PHP send.php Page:


// Receiving the data from the fields and set the data to a variables 
$first = $_POST; 
$last = $_POST;
$mobile = $_POST;
$country = $_POST;
$email = $_POST;
$body = $_POST;

// Testing the missing data
if ($first == "" || $last == "" || $mobile == "" || $country == "" || $body == ""){
    print "Missing data sent, please check the data before sending";
    print "<a href='javascript:history.go(-1);'>BACK</a>";

// Testing the validation of the Email
if (eregi("^+@+\.+$>", $email)) {
    print "Please check the Email format before sending";
    print "<a href='javascript:history.go(-1);'>BACK</a>";

// defining the sent data
$to = "";
$subject = "Message from your website";
$body = strip_tags($body);
$header = "From: ". $first . " <" . $email . ">\r\n";

// Sending the mail
$sent = mail($to,$subject,$body,$header);

// Testing the sent status
    print "Your mail has been sent successfully";

Wail Shalabi.