0% found this document useful (0 votes)
13 views4 pages

PHP Form

Uploaded by

Shkenca Natyrore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views4 pages

PHP Form

Uploaded by

Shkenca Natyrore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1.Ndertojme Index.

html

<html>

<head>

<title> Contact Form Design </title>

<link rel="stylesheet" type="text/css" href="style.css">

</head>

<body>

<div class="contact-form">

<form id="contact-form" method="post" action=" Forma-kontaktit.php

">

<input name="name" type="text" class="form control" placeholder="Name" required>

<br>

<input name="email" type="email" class="form control" placeholder="Email" required

<br>

<textarea name="message" class="form control" placeholder="Message" row="4" required


</textarea> <br>

<Input type="submit" class="form-control submit" value="Send Message">

</body>

</html>

2.Ndertojme Style.css

body {

margin: 0;
padding: 0;

text-align: center;

background: linear-gradient(rgbaa(0, 0, 50, 0.5), (rgbaa(0, 0, 50, 0.5)) , url(pic1.jpg);

background-size: cover;

background-position: center;

font-family: sans-serif;

.contact-title

margin-top: 100px;

color: #fff ;

text-transform: uppercase;

transition: all 4s ease-in-out;

.contact-title h1 {

font-size; 32px;

line-height: 10px;

.contact-title h2 {

font-size; 16px;

Form

margin-top: 50px;

transition: all 4s ease-in-out;

.form-control

{
width: 600px;

background: transparent;

border: none;

outline: none;

border-bottom: 1px solid gray;

color: #fff ;

font-size; 18px;

margin-bottom: 16px;

Input

height: 45px;

form .submit

Background: #ff5722;

Border-color: transparent;

color: #fff ;

font-size; 20px;

font-weight; bold;

letter-spacing: 2px;

height: 50px;

margin-top: 20px;

form .submit:hover

background-color: #f44336;

cursor: pointer;

}
3. Forma-kontaktit.php

$name = $_POST['name'] ;

$visitor_email = $_POST['email'] ;

$message = $_POST['message'] ;

$email_from = ' adrese web.com' ;

$email_subject = "New Form Submission" ;

$email_body = "User Name: $name.\n".

"User Email: $visitor_email.\n ".

"User Message: $message.\n ";

$to = [email protected];

$headers = "From: $email_from \r\n ";

$headers = "Reply-To: $visitor_email \r\n ";

mail($to,$email_subject,$email_body,$headers)

header ("Location: index.html");

You might also like