I want to update a record (hope this isn't too much!)
The record id is passed through the url, like this:
http://www.mywebsite.com/eventsin2.php?cal_id=8
This is what I've got, and it doesn't work:
<?php
if(isset($submit)):
$db = mysql_connect("localhost", "root");
mysql_select_db("content", $db);
$sql = "select * from calendar";
$result = mysql_query($sql) or die("db query failed_1");
$sql = "update calendar set event = $event', descrip = '$descrip', location_add3 = '$location_add3' where cal_id = $cal_id";
?>
The variables are called to the form like this:
<form action="eventsin-start.php" method="post">
<p class="mainText"><b>Name of Event:</b>
<br>
<input type="text" name="event" size="60" maxlength="100" value="<?php echo $event?>">
</p>
<input type="submit" name="submit" value="Submit Event">
</form>
Thanks for your help. I've poured over the forum and this is the best I could come up with.
Thanks!
Kathy