Re: problem with POST method.
- From: "J.O. Aho" <user@xxxxxxxxxxx>
- Date: Sat, 30 Jul 2005 13:05:50 +0200
Cooper wrote:
> Hello,
> i have a bit problem. So, is possible put a "POST" value in header into a page? i have a form with POST method, as for example:
>
> $variabile = contenuto;
>
> <form action="pagina.php" method="post">
> <input type="hidden" name="miavariabile" value="$variabile" />
> </form>
>
> but i don't want set the value of $variabile in a HTML line; i want to pass this value every for POST method loading it in header at page and to allow to read this value using:
>
> $myvar = $_POST["miavariabile"]
>
> i hope that as explained ok, so, some help for solve this problem?
> thank you,
> Cooper.
>
> PS: Sorry for my english.
>
>
--- page1.php ---
<html>
<head>
<title>page1</title>
</head>
<body>
<?PHP
$variabile1 = "contenuto";
$variabile2 = "ende";
?>
<form action="page2.php" method="post">
<input type="hidden" name="miavariabile" value="<?PHP echo $variabile1; ?>">
<input type="submit" value="<?PHP echo $variabile1; ?>">
</form>
<br>
<form action="page2.php" method="post">
<input type="hidden" name="miavariabile" value="<?PHP echo $variabile2; ?>">
<input type="submit" value="<?PHP echo $variabile2; ?>">
</form>
<body>
</html>
--- eof --
--- page2.php --- <html> <head> <?PHP $myvar = $_POST["miavariabile"]; ?> <title>page2 - <?PHP echo $myvar; ?></title> </head> <body> The option chosen by the user was <?PHP echo $myvar; ?> </body> </html> --- eof ---
???
//Aho .
- Follow-Ups:
- Re: problem with POST method.
- From: Cooper
- Re: problem with POST method.
- References:
- problem with POST method.
- From: Cooper
- problem with POST method.
- Prev by Date: problem with POST method.
- Next by Date: Calculate length of string in pixels?
- Previous by thread: problem with POST method.
- Next by thread: Re: problem with POST method.
- Index(es):
Relevant Pages
|