<?php
$company = $_POST["company"];
if(isset($_POST['submit']))
{
$result = mysql_query("SELECT * FROM detail WHERE company_name=$company");
while($row = mysql_fetch_array($result))
{
echo $row['premise_name']."<br />";
echo $row['company_name']."<br />";
echo $row['address']."<br />";
echo $row['owner_name']."<br />";
echo $row['phone_num']."<br />";
echo $row['date_start']."<br />";
echo $row['date_end']."<br />";
echo $row['contract']."<br />";
echo $row['rent']."<br />";
echo $row['category']."<br />";
echo $row['status']."<br /.";
} // TODO: better error handling
}
mysql_close();
?>
<html>
<head>
<style type="text/css">
ul {
list-style: none;
margin: 0;
}
li {
float: left;
}
a {
background: #404853;
background: linear-gradient(#687587, #404853);
border-left: 1px solid rgba(0, 0, 0, 0.2);
border-right: 1px solid rgba(255, 255, 255, 0.1);
color: #fff;
display: block;
font-size: 18px;
font-weight: bold;
padding: 0 23px;
line-height: 44px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
text-transform: uppercase;
}
a:link {
text-decoration:none;
color:#000000;
}
a:active {
text-decoration:none;
color:#FFF;
background:21B9FF;
}
a:visited {
text-decoration:none;
color:#000000;
}
a {
text-decoration:none;
color:#000000;
}
a:hover, a.current {
color:#FFF;
background-color:#21B9FF;
}
</style>
</head>
<body bgcolor = "#33CCFF">
<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
$startNew = $_POST["startNew"];
$endNew = $_POST["endNew"];
$contractNew = $_POST["contractNew"];
if($_SERVER['REQUEST_METHOD']=="POST")
{
if($company
mysql_query("INSERT INTO premis (startNew,endNew,contractNew)
VALUES('$startNew','$endNew','$contractNew')")
or die(mysql_error());
echo '<p><H2>Data has been update to MySQL</H2>';
echo '</p>';
echo '<p><H3>THE INFORMATION OF PREMISE</H3></p>';
echo '<br />';
echo '<ul>';
echo '<b>NEW START DATE OF CONTRACT : </b>' . $startNew;
echo '<p>';
echo '<br />';
echo '<b>NEW END DATE OF CONTRACT : </b>' . $endNew;
echo '<p>';
echo '<br />';
echo '<b>RENEWAL OF CONTRACT(YEAR) : </b>' . $contractNew;
echo '</ul>';
}
else
echo "PLEASE FULFILL THE FORM";
?>
</body>
</html>
PHP code To upgrade any data with css in it
Related Posts:
PHP Code for Inserting Data<html> <head> <style type="text/css"> ul { list-style: none; margin: 0; } li { float: left; } … Read More
HTML code to Design front Page of any hotel<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>KHYBERS G… Read More
Simplest jQuery Slideshow Code Simplest jQuery Slideshow Code <html "> <head> <title>Simplest jQuery Slideshow</title> <style> body {font-family:Arial, Helvetica, sans-serif; font-size:12px;} .fadein { posit… Read More
Hangman game code in Visual c#using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace hangman_csharp { static class Program { /// <summary> &nb… Read More
LOGIN Form Login form with css and Database connectivity and sql file Free download the zip folder :click to download … Read More
0 comments:
Post a Comment