re-post variable on http-equiv=refresh ...
Posted: Thu Apr 26, 2012 1:30 pm
i run some form code which posts a variable to the next page
the next page is a form that does things and relies on the previously posted variable to tell it which record in the db to post to
once i submit to form, the table updates like it should and i redirect to the page where it all started.
but what i want is after i arrive at the second page, once i post, i want to stay on that page and hold onto the variable
eg page 1 Record List Page
Page 2 Assign Task Page
process request page
so instead of going back to page 1 i want to do this:
<meta HTTP-EQUIV="REFRESH" content="0; url=page2.php">
this will take me back to page 2, but the file_id # gets wiped out.
how can i redirect back to page 2 but keep the file_id?
the next page is a form that does things and relies on the previously posted variable to tell it which record in the db to post to
once i submit to form, the table updates like it should and i redirect to the page where it all started.
but what i want is after i arrive at the second page, once i post, i want to stay on that page and hold onto the variable
eg page 1 Record List Page
Code: Select all
<form border=0 name="s_ud" action="assign.php" method="post">
<input type="hidden" value="<?php echo $row2[0] ?>" name="file_id" />
</form>
Code: Select all
<form border=0 name="s_ud" action="assign_t.php" method="post">
<input type="hidden" value="<?php echo $row2[0] ?>" name="file_id" />
</form>
Code: Select all
<?
include 'dbinfo.inc.php';
//$term = $_POST['term'];
$term2 = $_POST['file_id'];
$query2 = "UPDATE ldata SET last_task='$task_r' WHERE file_id=$file_id";
mysql_query($query2);
?>
<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=page1.php">
so instead of going back to page 1 i want to do this:
<meta HTTP-EQUIV="REFRESH" content="0; url=page2.php">
this will take me back to page 2, but the file_id # gets wiped out.
how can i redirect back to page 2 but keep the file_id?