Page 1 of 1

Calling a row, then editing it =o

Posted: Sun Jun 16, 2002 8:09 am
by Aaron
Hey, I made a form that calls the row from the id inputted and then lets the user edit it by running there changes(submit) through editsubmit.php

Heres Editsubmit!

Code: Select all

<?php 
mysql_connect("localhost","unknownz","password") or die(mysql_error());
mysql_select_db("unknownz") or die(mysql_error());

if($author  != ""&& $series != "" && $episode != "" && $title != "" && $info != "")&#123;
mysql_query("UPDATE unknownz.unz SET series = '$series', episode = '$episode', title ='$title', info ='$info', infolong ='$infolong', date = '$date' WHERE id = '$id'") or die (mysql_error());
&#125; ?>

<html> 
<head> 
<title>Accepted</title> 
</head> 
<body marginheight="0" marginwith="0" topmargin="0" leftmargin="0"> 
<?php if($error) &#123; echo "<b> - Error - </b><br>"; &#125; 
if($author  == "" || $series == "" || $episode == "" || $title == "" || $info == "") &#123; echo " <code>You did not complete the form</code>"; &#125; 
?>
See its saying its accepted when I edit it however it isnt at all :|

Posted: Sun Jun 16, 2002 10:34 am
by jason
echo out the actualy SQL statement and see if it's what you want.