0% found this document useful (0 votes)
27 views3 pages

HTML Lang Charset Content Name Content Rel Href Rel Href Integrity Crossorigin Referrerpolicy

This document contains PHP code for a reservation form. It includes a connection to a database and defines form fields for collecting a customer's name, email, address, phone number, and date. The form submits to add the customer's information to a database table. It also displays the table of customer information from the database on the same page.

Uploaded by

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

HTML Lang Charset Content Name Content Rel Href Rel Href Integrity Crossorigin Referrerpolicy

This document contains PHP code for a reservation form. It includes a connection to a database and defines form fields for collecting a customer's name, email, address, phone number, and date. The form submits to add the customer's information to a database table. It also displays the table of customer information from the database on the same page.

Uploaded by

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

<?

php
include "connect.php"
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/6.3.0/css/all.min.css" integrity="sha512-
SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGK
HEyjSoQ1zVisanQ==" crossorigin="anonymous" referrerpolicy="no-referrer"
/>
<title>Reservation</title>
</head>
<body>
<!---- Start admin panel---->
<div class="Reservation">
<form action="index.php"mehod="post">
<nav>
<img src="4.jpg" alt="">
<h4>Reservation</h4>
<label>Name Customer</label><br>
<input type="text"Name="Nema"><br>

<label>Customer Email</label><br>
<input type="text"Name="Email"><br>

<label>Customer Address</label><br>
<input type="text"Name="Address"><br>

<label>Customer Phone Number</label><br>


<input type="text"Name="Phone Number"><br>

<label>Customer Date</label><br>
<input type="Date"Name="Date"><br>

<button type="submit"name="sub">Reset</button>
<button type="submit" name="sub">Add</button>

<div class="sacial">
<i class="fa-brands fa-facebook"></i>
<i class="fa-brands fa-twitter"></i>
<i class="fa-brands fa-google-plus-g"></i>
<i class="fa-solid fa-share"></i>
<p>Developer By Waleed Farouk</p>

</div>
</nav>
<!---- end admin panel---->
<!---- Start info---->
<div class="info">
<table>
<tr>
<th>Id</th>
<th>Name Customer</th>
<th>Email</th>
<th>Address</th>
<th>Phone Number</th>
<th>Date</th>
</tr>
<?php
$query="SELECT * FROM customer ";
$result =mysqli_query($con,$query);
if($result){
while($row = mysqli_fetch_assoc($result)){
echo "<tr><td>" .$row['id'].
"</tr><td>" .$row['Name'].
"</tr><td>" .$row['Email'].
"</tr><td>" .$row['Address'].
"</tr><td>" .$row['Phone Number'].
"</tr><td>" .$row['Date'].
"</td></tr>";
}
echo "</table";

}
else{
echo "‫;"يوجد خطاء ما‬
}
?>
</table>
</div>
</form>

<!---- end info---->


<?php
//insert info
if(@$_POST['Add']){
$Name =$_post['Nema'];
$Email =$_post['Email'];
$Address =$_post['Address'];
$Phone =$_post['Phone Number'];
$Date =$_post['Date'];
$query="INSERT INTO customer(Name,Email,Address,phone Number,Date)
VALUES ('$Name','$Email','$Address','$Phone','$Date')";
$result = mysqli_query($con,$query);
echo "‫;"تم الحجز‬
}
else{
echo ".‫;"يوجد خطاء ما‬
}

?>
</div>
</body>
</html>

You might also like