Quick edit record question
Posted: Thu May 05, 2005 12:10 pm
Code: Select all
<?php
$submit = $_POST["submit"];
if ($submit) {
$username = $_POST["username"];
$comment = $_POST["comment"];
$connection = mysql_connect("localhost", "****", "****") or die("connect");
mysql_select_db("****",$connection) or die ("Unable to select requested database.");
$changeresult = mysql_query
("UPDATE `auth` SET `comm` = $comment WHERE `username` = $username");
$result=mysql_query($changeresult, $connection);
$affected_rows=mysql_affected_rows($connection);
echo "<b>$username</b> was affected.";
}
?>-Thanks in advance
Eric