The following is my code and it doesnt up date the iformation.
Any suggestions?
<?php
include("config.php");
if(isset($_POST['submit']))
{
// Set global variables to easier names
// and prevent sql injection and apostrophe to break the db.
$title = mysql_escape_string($_POST['title']);
$text1 = mysql_escape_string($_POST['text1']);
$result = mysql_query("UPDATE 'news' SET 'title'='$title' AND 'text1'='$text1' WHERE 'newsid'='$newsid'",$connect);
echo "<b>Thank you! News UPDATED Successfully!<br>You'll be redirected to Home Page after (4) Seconds";
echo "<meta http-equiv=Refresh content=4;url=index.php>";
}
elseif(isset($_GET['newsid']))
{
$result = mysql_query("SELECT * FROM news WHERE newsid='$_GET[newsid]' ",$connect);
while($myrow = mysql_fetch_assoc($result))
{
$title = $myrow["title"];
$text1 = $myrow["text1"];
?>
<br>
<h3>::Edit News</h3>
<form method="post" action="<?php echo $PHP_SELF ?>">
<input type="hidden" name="newsid" value="<? echo $myrow['newsid']?>">
Title: <input name="title" size="40" maxlength="255" value="<? echo $title; ?>">
<br>
Text1: <textarea name="text1" rows="7" cols="30"><? echo $text1; ?></textarea>
<br>
<input type="submit" name="submit" value="Update News">
</form>
<?
}//end of while loop
}//end else
?>