Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INDEX.PHP
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Untitled
- Document</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <div id="TopsPart">
- <div id="LogoPart">
- <img src="images/US_Cellular_logo_logotype.png" width="200px" alt="">
- </div>
- <div id="NavPart">
- <menu>
- <li><a href="index.php">home</a></li>
- <li><a href="insert.php">insert</a></li>
- <li><a href="select.php">select</a></li>
- <li><a href="update.php">update</a></li>
- <li><a href="delete.php">delete</a></li>
- </menu>
- </div>
- <div id="BannerPart">
- Document</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body><?php
- include('slider.html');
- ?>
- </div>
- </div>
- <div id="ContentPart"></div>
- <div id="FooterPart">
- <table width="100%" border="0" style="color:white; text-align:center;">
- <tbody>
- <tr>
- <td>Adress: <br> Duhok</td>
- <td>Phone: <br>123456789</td>
- <td><img src="images/DSC_0125.JPG" width="15px" </td>
- </tr>
- <tr>
- <td> </td>
- <td>Newros uni.</td>
- <td> </td>
- </tr>
- </tbody>
- </table>
- </div>
- </body>
- </html>
- ------------------------------------------------------------
- CONFIG.PHP
- <?php
- $con=mysqli_connect("localhost","root","","lasttest");
- if(!$con){
- echo"Error";
- }
- ?>
- ----------------------------------------------------
- INSERT.PHP
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Untitled Document</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <div id="TopsPart">
- <div id="LogoPart">
- <img src="images/US_Cellular_logo_logotype.png" width="200px" alt="">
- </div>
- <div id="NavPart">
- <menu>
- <li><a href="index.php">home</a></li>
- <li><a href="insert.php">insert</a></li>
- <li><a href="select.php">select</a></li>
- <li><a href="update.php">update</a></li>
- <li><a href="delete.php">delete</a></li>
- </menu>
- </div>
- <div id="BannerPart">
- <?php
- include('slider.html');
- ?>
- </div>
- </div>
- <div id="ContentPart">
- <br>
- <form method="POST">
- <table width="300" border="1" align="center">
- <tbody>
- <tr>
- <td>Name:</td>
- <td><input type="text" id="name" name="name"</td>
- </tr>
- <tr>
- <td>Date:</td>
- <td><input type="text" name="date" id="date"></td>
- </tr>
- <tr>
- <td>Info:</td>
- <td><input type="text" name="info" id="info"></td>
- </tr>
- <tr>
- <td colspan="2" align="center"><input type="submit" name="submit" id="submit"></td>
- </tr>
- </tbody>
- </table>
- </form>
- </div>
- <div id="FooterPart">
- <table width="100%" border="0" style="color:white; text-align:center;">
- <tbody>
- <tr>
- <td>Adress: <br> Duhok</td>
- <td>Phone: <br>123456789</td>
- <td><img src="images/DSC_0125.JPG" width="15px" </td>
- </tr>
- <tr>
- <td> </td>
- <td>Newros uni.</td>
- <td> </td>
- </tr>
- </tbody>
- </table>
- </div>
- </body>
- </html>
- <?php
- include "config.php";
- if(isset($_REQUEST['submit'])){
- $name=$_POST['name'];
- $date=$_POST['date'];
- $info=$_POST['info'];
- $insert= "INSERT INTO lasttest_tbl (Name,Date,Info) VALUES ('$name','$date','$info')";
- if(mysqli_query($con,$insert)){
- echo "Inserted";
- }
- else{
- echo "not inserted";
- }
- }
- ?>
- UPDATE.PHP
- -----------------------------------------------------
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Untitled Document</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <?php
- include "config.php";
- ?>
- <br>
- <div id="TopPart">
- <div id="LogoPart">
- <img src="images/US_Cellular_logo_logotype.png" width="200px" alt="">
- </div>
- <div id="NavPart">
- <menu>
- <li><a href="index.php">Home</a></li>
- <li><a href="insert.php">Insert</a></li>
- <li><a href="select.php">Select</a></li>
- <li><a href="update.php">Update</a></li>
- <li><a href="delete.php">Delete</a></li>
- </menu>
- </div>
- <div id="BannerPart">
- <?php
- include "slider.html";
- ?>
- </div>
- </div>
- <div id="ContentPart">
- <?php
- include "config.php";
- $select = "SELECT * FROM lasttest_tbl";
- $result = mysqli_query($con,$select);
- echo "<table border=1>";
- echo "<tr>";
- echo "<td> ID </td>";
- echo "<td> Name </td>";
- echo "<td> Date </td>";
- echo "<td> Info </td>";
- echo "</tr>";
- while($row = mysqli_fetch_array($result)){
- echo "<tr>";
- echo "<td>" . $row['id'] . "</td>";
- echo "<td>" . $row['Name'] . "</td>";
- echo "<td>" . $row['Date'] . "</td>";
- echo "<td>" . $row['Info'] . "</td>";
- echo "</tr>";
- }
- echo "</table>";
- ?>
- <br>
- <br>
- <form method="post">
- <input type="text" name="name">
- <input type="text" name="newname">
- <input type="submit" name="submit">
- <?php
- include "config.php";
- if(isset($_REQUEST['submit'])){
- $oldname = $_POST['name'];
- $newname = $_POST['newname'];
- $update = "UPDATE lasttest_tbl SET name='". $newname."' WHERE name = '". $oldname . "' ";
- if(mysqli_query($con,$update)){
- echo "update";
- }
- else {
- echo "not";
- }
- }
- ?>
- </form>
- </div>
- </html>
- -------------------------------------------
- DELETE.PHP
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Untitled Document</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <?php
- include "config.php";
- ?>
- <br>
- <div id="TopPart">
- <div id="LogoPart">
- <img src="images/US_Cellular_logo_logotype.png" width="200px" alt="">
- </div>
- <div id="NavPart">
- <menu>
- <li><a href="index.php">Home</a></li>
- <li><a href="insert.php">Insert</a></li>
- <li><a href="select.php">Select</a></li>
- <li><a href="update.php">Update</a></li>
- <li><a href="delete.php">Delete</a></li>
- </menu>
- </div>
- <div id="BannerPart">
- <?php
- include "slider.html";
- ?>
- </div>
- </div>
- <div id="ContentPart">
- <?php
- include "config.php";
- $select = "SELECT * FROM lasttest_tbl";
- $result = mysqli_query($con,$select);
- echo "<table border=1>";
- echo "<tr>";
- echo "<td> ID </td>";
- echo "<td> Name </td>";
- echo "<td> Date </td>";
- echo "<td> Info </td>";
- echo "</tr>";
- while($row = mysqli_fetch_array($result)){
- echo "<tr>";
- echo "<td>" . $row['id'] . "</td>";
- echo "<td>" . $row['Name'] . "</td>";
- echo "<td>" . $row['Date'] . "</td>";
- echo "<td>" . $row['Info'] . "</td>";
- echo "</tr>";
- }
- echo "</table>";
- ?>
- <br>
- <br>
- <form method="post">
- <input type="text" name="names">
- <input type="submit" name="submit">
- <?php
- include "config.php";
- if(isset($_REQUEST['submit'])){
- $deleteid = $_POST['names'];
- $delete = "DELETE FROM lasttest_tbl WHERE Name ='".$deleteid."'";
- if(mysqli_query($con,$delete)){
- echo"HIIIII";
- }
- else {
- echo "error"; }
- }
- ?>
- </form>
- </div>
- <div id="FooterPart">
- <table border="0" styel="color: white;">
- <tr>
- <td>Adress <br> duhok</td>
- <td>Contact <br> 08365367</td>
- <td> <img src="images/US_Cellular_logo_logotype.png" width="100px; "alt=""></td>
- </tr>
- </table>
- </div>
- </html>
- ---------------------------------------------------------
- SELECT.PHP
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Untitled
- Document</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <div id="TopsPart">
- <div id="LogoPart">
- <img src="images/US_Cellular_logo_logotype.png" width="200px" alt="">
- </div>
- <div id="NavPart">
- <menu>
- <li><a href="index.php">home</a></li>
- <li><a href="insert.php">insert</a></li>
- <li><a href="select.php">select</a></li>
- <li><a href="update.php">update</a></li>
- <li><a href="delete.php">delete</a></li>
- </menu>
- </div>
- <div id="BannerPart">
- Document</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body><?php
- include('slider.html');
- ?>
- </div>
- </div>
- <div id="ContentPart">
- <?php
- include('config.php');
- $select = "select * from lasttest_tbl";
- $result = mysqli_query($con,$select);
- echo "<table border=1>";
- echo "<tr>";
- echo "<td> ID:</td>";
- echo "<td> Name:</td>";
- echo "<td> Date:</td>";
- echo "<td> Info:</td>";
- while($row= mysqli_fetch_array($result)){
- echo "<tr>";
- echo "<td>". $row['Id']."</td>";
- echo "<td>". $row['Name']."</td>";
- echo "<td>". $row['Date']."</td>";
- echo "<td>". $row['Info']."</td>";
- echo "</tr>";
- }
- echo"</table>";
- ?>
- </div>
- <div id="FooterPart">
- <table width="100%" border="0" style="color:white; text-align:center;">
- <tbody>
- <tr>
- <td>Adress: <br> Duhok</td>
- <td>Phone: <br>123456789</td>
- <td><img src="images/DSC_0125.JPG" width="15px" </td>
- </tr>
- <tr>
- <td> </td>
- <td>Newros uni.</td>
- <td> </td>
- </tr>
- </tbody>
- </table>
- </div>
- </body>
- </html>
- ------------------------------------------
- STYLE.CSS
- @charset "utf-8";
- #LogoPart img{
- margin:0 auto;
- display: block;
- }
- #NavPart menu {
- text-align: center;
- margin: 0 auto;
- padding: 12px 17px;
- list-style-type: none;
- }
- #NavPart li{
- display: inline-block;
- color:white;
- }
- #NavPart a{
- padding: 12px 17px;
- margin-left: 20px;
- text-decoration: none;
- color:white;
- }
- #NavPart a:hover{
- color:white;
- background-color: blue;
- }
- body{
- background-color: black;
- color:white;
- }
- #FooterPart{
- width:100%;
- text-align:center;
- color:white;
- bottom:0;
- position: absolute;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement