Re: problem with POST method.



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 .



Relevant Pages

  • Re: How to post a web form to an external isapi?
    ... GET or POST method without encryption gives the same result. ... If you are able to connect over SSL channel, ... Well the server im posting to uses SSL encryption. ... This html page aslo has a onload event on its ...
    (microsoft.public.dotnet.framework.aspnet)
  • Posting Data to pages using VBA (Microsoft.XMLHTTP and MSXML2.ServerXMLHTTP.4.0)
    ... with the POST method. ... The code would populate the objects by modifying the HTML ... like to see testB.htm in the responseText when I post testA.htm. ... Set xmlHTTP = CreateObject ...
    (microsoft.public.scripting.vbscript)
  • RE: http POST from asp .Net to older asp application
    ... application via the post method. ... Server 2003 asp webpage. ... When I call the application from within an html or asp page, ... variables (idProjectName and idProjectID). ...
    (microsoft.public.dotnet.general)
  • Re: GET and POST
    ... Newsgroups: comp.lang.php ... html and php, ... I always try to use forms and the POST method to pass variables between pages. ...
    (comp.lang.php)
  • problem with POST method.
    ... but i don't want set the value of $variabile in a HTML line; ... this value every for POST method loading it in header at page and to allow ... Prev by Date: ...
    (alt.php)