Two questions:
1)This code did not update after I made connection and successfully sent all the right side variables from form into this script.I am within php tags. Can you help.
$sqla = "UPDATE faq SET f_ans='$f_ans',".
"f_question = '$f_question',".
"f_keywd1='$f_keywd1',".
"f_keywd2='$f_keywd2',".
"f_keywd3='$f_keywd3',".
"f_keywd4='$f_keywd4',".
"WHERE f_num = '$f_num'";
$resulta = mysql_query($sqla);
2)
<?php
if(!($connection = mysql_connect("localhost",
"qswat",
"qswat"
exit ("Could not connect to server"
if (!($db = mysql_select_db("QSWAT"
exit("Could not select database"
$sql = "select * from faq where f_num = '$f_num'";
$result = mysql_query($sql);
$row=mysql_fetch_array($result);
extract($row);
echo"<H3>Update the fields in the form below</H3>\n";
echo"<form action = 'faq_update.php' method='post'>";
// The one below puts the table data in the textbox but the box is extreamly long on one line!
echo"ANSWER:<INPUT TYPE='text' NAME='f_ans' value='$f_ans' SIZE=500><br>";
//The bottom 2 make a nice text area but do not put table data into the box.
echo"ANSWER:<TEXTAREA NAME=f_ans value=$row[f_ans] COLS=110 ROWS=8></textarea><br>";
echo"ANSWER:<TEXTAREA NAME=f_ans value='$f_ans' COLS=110 ROWS=8></textarea><br>";
</form>
?>
I am probably doing somethig stupid, but after 5 hours I need a life line. Please help.