Tuesday, 3 March 2015

manage.php

<?php
include('topmenu.php');
include('leftmenu.php');
?>
<html>
<body>
<div style="background-color:white;
background-image:url('homeee.jpg');width:1000px;height:500px;
color:black"/>
<br/>
<form method="post">
Property Type<input type="text" name="t"/>
<input type="submit" value="submit" name="btn"/>
</form>
<pre>      <a href="delete.php">view & delete</a></pre>

</form>
</div>
</body>
</html>

<?php
if(isset($_POST['btn']))
{
mysql_connect('localhost','root');
mysql_select_db('ibuyhome');
$query="insert into property_type(p_type)values('".$_POST['t']."')";
$data=mysql_query($query);
if($data)
{
echo "property type added";
}
else
{
echo mysql_error();
}
}
?>

0 comments:

Post a Comment