i get the id value right from the database but in the update statement doesn't work....
Code:
<?php
mysql_connect('localhost','root','');
mysql_select_db('project_1');
$id =$_GET['id'];
$title = $_POST['title'];
$discr = $_POST['discr'];
$location = $_POST['location'];
$date = $_POST['date'];
echo $id;
if(isset($id) && isset($title) && isset($discr) && isset($location) && isset($date)){
echo $id;
$query = "UPDATE `project_1`.`event_manager` SET `event_manager`.`event title`='$title',`event_manager`.`discription`='$discr',`event_manager`.`location`='$location',`event_manager`.`date/time`='$date' WHERE `event_manager`.`id`=`$id`";
if(mysql_query($query)){
echo 'the table s updated';
}
}
?> <form action='http://bytes.com/edit.php' method='POST'>
title:<br/><input type="text" name="title"><br/><br/>
discription:<br/><input type="text" name="discr"><br/><br/>
location:<br/><input type="text" name="location"><br/><br/>
date:<br/><input type="text" name="date"><br/><br/> <input type='submit' value='update' name='update'> </form>
Comment