Passing variables using header location?

Hello

I have an online form and I want to get the values of the form posted through to my next page. Now I have to use header to submit the form to the next page rather than through the form element, as I want to get the number value that I post in my first box num (which I can) But I also want the values I post for Gallery Name and Credit to be avaliable to me on the next page? Which I can’t How can I do this?

Here’s the basics of my page(S)

First Page


<?
if (isset($_POST['Submit']))
{
    header("Location: upload.php?num=".$_POST['num']."");
}
?>

<form id="webform" action="" method="post"  name="webform">

<!-- How Many pictures would you like to upload to the gallery -->
    <label>How many pictures:
    <span class="small">Please type in how many pics you would like to upload</span>
    </label>
    <input name="num" class="big" type="text" id="num" style="width: 300px" value="" />
 <div class="spacer"></div>

<!-- What is the Gallery Name -->
    <label>Gallery Name:
    <span class="small">Please enter a gallery title</span>
    </label>
    <input name="the_title" class="big" type="text" id="the_title" style="width: 300px" value="" />
    <div class="spacer"></div>
	
<!-- Who took the pictures -->
    <label>Credit:
    <span class="small">Who took these pictures</span>
    </label>
    <input name="credit" class="big" type="text" id="credit" style="width: 300px" value="" />
    <div class="spacer"></div>

</form>

Second Page - upload.php accesses when I hit submit


Pictures to Upload : <?php echo $_GET['num']; ?> <br />
Gallery Name : ?How can I get this value posted on this page from the first page? <br />
Credit : ?How can I get this value posted on this page from the first page? <br />

Can anyone kindly help


$args = array(
    'num' => $_POST['num'],
    'the_title' => $_POST['the_title']
...etc...
);

echo 'upload.php?' . http_build_query($args);

Sorry, but I don’t quite get what you mean? Something like?


<?
if (isset($_POST['Submit']))
{

$args = array(
'num' => $_POST['num'],
'the_title' => $_POST['the_title']
);

header("Location: upload.php?' . http_build_query($args)");
}
?>

Then also how would I coutput the the_title on the next page when I hit submit?

Variables in the querystring are retreived via $_GET:


echo $_GET['the_title'];

Thanks, but how about the header location?

header(“Location: upload.php?” . http_build_query($args));