Reply to Re: How to transfer the variable to next page?

Your name:

Reply:


Posted by David Haynes on 05/21/06 16:11

Alex Murphy wrote:
> But... how to post a predefined variable?
>

The first step is to get php to send the predefined value to the web
browser. This may be done using SESSIONs.

session_start();
$_SESSION['predefined'] = $predefined;
session_write_close();
header('Location: first_page.php');

Then, in first_page.php, you get the predefined value back and place it
into a POST value.

session_start();
<form action="second_page.php" method="POST">
<input type="hidden" name="predefined" value="<?php echo
$_SESSION['predefined'];?>">
</form>

Now, the value of 'predefined' is available to second_page.php as a
$_POST value.

$predefined = $_POST['predefined'];

Does this help?

-david-

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация