Calling a row, then editing it =o

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Aaron
Forum Commoner
Posts: 82
Joined: Sun May 12, 2002 2:51 pm

Calling a row, then editing it =o

Post 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 :|
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

echo out the actualy SQL statement and see if it's what you want.
Post Reply