Howdy-
I have the following code:
function do_edit() {
$dbuser =
$dbpass =
$dbhost = localhost;
$db_link = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db(contentmanagement, $db_link) or die(mysql_error());
$query = mysql_query("select * from news where title = '$_POST[article_edit]'");
while ($dbrow = mysql_fetch_array($query)):
echo "<center>";
echo "<form action=$_POST[PHP_SELF] method=post>";
echo "<input type=hidden value=\"news_article_update\">";
echo "Name:<br><input type=text value=\"$dbrow[byline]\"><br>";
echo "Title:<br><input type=text value=\"$dbrow[title]\"><br>";
echo "Story:<br><TEXTAREA ROWS=15 COLS=60 name=updateditems>$dbrow[data]</TEXTAR
EA>";
echo "<br><INPUT TYPE=\"submit\" name=\"submit\"><INPUT TYPE=\"reset\">";
echo "</form>";
echo "</center>";
endwhile;
}
The problem I'm facing with this is that once the user clicks submit to re-enter the data database it doesn't work correctly because the value's of the form fields is the original data culled from the database, so the question I have is, can someone point in the direciton of how I could name the value's something so that I can pass them via $_POST to another function and still have the fields auto filled upon initial search without the value's being the results of the mysql array?