docs
[mirrors/Programs.git] / php / getvals.php
1 <form name="mydata" action="<?php echo($_POST["serviceurl"]); ?>" method="POST">
2 <?php
3 //$POST["serviceurl"] = redirect adresa
4
5 function form_submit($name) {
6 echo("\n\n<script type=\"text/javascript\">document.".$name.".submit()</script>");
7 }
8
9 ///CODE//////////////////////////
10
11 $out = "\r\n\r\n";
12 foreach($_POST as $ind => $val) {
13 $out = $out.$ind." = ".$val."\r\n";
14 echo("\n<input type=\"hidden\" name=\"".$ind."\" value=\"".$val."\" />");
15 }
16 echo("\r\n<input type=\"submit\" name=\"mydatasubmit\">\r\n</form>");
17
18 $fp = fopen("log.txt", "a");
19 fwrite($fp, $out);
20 fclose($fp);
21
22 //Debug
23 echo("<!--\r\n");
24 print_r($_POST);
25 echo("\r\n-->");
26
27 //form_submit("mydata");
28 header("Location: ".$_POST["serviceurl"]);
29
30 ?>
This page took 0.281657 seconds and 4 git commands to generate.