I am using $HTTP_POST_VAR to pass some variables from a form in order that I can then update a record.
Nothing is happening so I included echo statements to see what was being passed and out of 7 statements, only 1 is working.
the first part of the page calls a record in and displays it in the form, so I now that the information is available, but I cannot get it to update as there are no values when I go to update.
Second part of code:
<?php
if ($HTTP_POST_VARS['Save'])
{
include("myconnect.php");
$article_id=$HTTP_POST_VARS['article_id'];
$article_top_id=$HTTP_POST_VARS['article_top_id'];
$article_title=$HTTP_POST_VARS['article_title'];
$article_text=$HTTP_POST_VARS['article_text'];
$article_date=$HTTP_POST_VARS['article_date'];
$article_imagelink=$HTTP_POST_VARS['article_imagelink'];
$status=$HTTP_POST_VARS['status'];
$query =("UPDATE article SET article_id='$article_id', article_top_id='$article_top_id',article_title='$article_title', article_text='$article_text',article_date='$article_date',article_imagelink='$article_imagelink',status='$status' WHERE article_id='$article_id'");
$result=mysql_query($query);
if ($result) {
header ('Location: next.php?confirm= Item successfully updated');
}//end if result
else {
echo "<b>ERROR: unable to post - Try again</b>";
}//end else
}//end first if
echo "<p><p>You entered the following information:<br>";
echo "<b>article_id:</b> $article_id<br>";
echo "<b>article_top_id:</b> $article_top_id<br>";
echo "<b>article_title:</b> $article_title<br>";
echo "<b>article_text:</b> $article_text<br>";
echo "<b>article_date:</b> $article_date<br>";
echo "<b>article_imagelink:</b> $article_imagelink<br>";
echo "<b>status:</b> $status<br>";
?>
Any help would be apreciated