Commit f1f29dab by zekena

contact+styles

parent 3ab4db56
<?php
if (isset($_POST["submit"])) {
if (empty($_POST["name"])) {
$error .= '<p><label class="text-danger">Please Enter your Name</label></p>';
} else {
$name = clean_text($_POST["name"]);
if (!preg_match("/^[a-zA-Z ]*$/", $name)) {
$error .= '<p><label class="text-danger">Only letters and white space allowed</label></p>';
}
}
if (empty($_POST["email"])) {
$error .= '<p><label class="text-danger">Please Enter your Email</label></p>';
} else {
$email = clean_text($_POST["email"]);
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$error .= '<p><label class="text-danger">Invalid email format</label></p>';
}
}
if (empty($_POST["message"])) {
$error .= '<p><label class="text-danger">Message is required</label></p>';
} else {
$message = clean_text($_POST["message"]);
}
if ($error == '') {
$file_open = fopen("contact_data.csv", "a");
$no_rows = count(file("contact_data.csv"));
if ($no_rows > 1) {
$no_rows = ($no_rows - 1) + 1;
}
$form_data = array(
'sr_no' => $no_rows,
'name' => $name,
'email' => $email,
'message' => $message
);
fputcsv($file_open, $form_data);
$error = '<label class="text-success">Thank you for contacting us</label>';
$name = '';
$email = '';
$message = '';
}
}
Name,Email,Message
zeyad
23facas
zida@gma.com
3,zeyad,zida@gma.com,23facas
4,zeyad,zida@gma.com,23facas
5,zeyad,zida@gma.com,23facas
6,zeyad,zida@gma.com,23facas
......@@ -137,7 +137,7 @@ body{background-image: url("../Volume.jpg");
border-radius: 17px;
width: 50%;
position: relative;
top: 150px;
top: 10px;
}
#theme {
position: relative;
......
......@@ -137,7 +137,7 @@ body{ background-image: url("../Area.jpg");
border-radius: 17px;
width: 50%;
position: relative;
top: 150px;
top: 10px;
}
#theme {
position: relative;
......
......@@ -133,13 +133,12 @@ body{
-moz-box-shadow: 16px 1px 15px -1px rgba(0,0,0,0.61);
box-shadow: 16px 1px 15px -1px rgba(0,0,0,0.61);
background-color: #3FB74F;
padding:25px 32px;
padding:5px 32px;
height:50%;
border-radius: 17px;
width: 50%;
width: 80%;
position: relative;
top: 150px;
top: 10px;
}
#theme {
position: relative;
......
......@@ -139,7 +139,7 @@ body{
border-radius: 17px;
width: 50%;
position: relative;
top: 150px;
top: 10px;
}
#theme {
position: relative;
......
......@@ -135,9 +135,9 @@ body{background-image: url("../temp.jpg");
height:50%;
border-radius: 17px;
width: 50%;
width: 80%;
position: relative;
top: 150px;
top: 10px;
}
#theme {
position: relative;
......
......@@ -139,7 +139,7 @@ body{
border-radius: 17px;
width: 50%;
position: relative;
top: 150px;
top: 10px;
}
#theme {
position: relative;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment