This won't update my info in a database, am I doing something wrong?
Page 1:
<?
mysql_pconnect("localhost","dhill","******"); //enter name and password
mysql_select_db("simplebit_com"); //select the database
$result = mysql_query("select * from bio_intro"); //replace news with your table name
while($r=mysql_fetch_array($result))
{
$entry=$r["entry"];
echo "Message: <br>";
echo "<form name =\"form1\" method=\"get\" action=\"intro2.php\">";
echo "<TEXTAREA NAME=\"entry\" ROWS=10 COLS=30 value=\"$entry\">$entry</TEXTAREA>";
echo "<br><input type=\"Submit\" name=\"submit\" value=\"submit\" class='formtex'>";
echo "</form>";
}
?>
Page 2:
<?PHP
//connect to database
require('../config.inc');
$cid = mysql_connect($host,$usr,$passwd);
if (!$cid) {
echo("ERROR: " . mysql_error() . "\n");
}
// delete
$SQL = " UPDATE bio_intro ";
$SQL = $SQL . " SET entry = '$entry' WHERE entry = '$entry' ";
mysql_db_query($db, $SQL, $cid);
print ("Introduction Updated!");
?>