By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,528 Members | 1,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,528 IT Pros & Developers. It's quick & easy.

php - POST

P: 2
I have a problem with php and i need help!

I have a simple form in html like:
test.html:
************************************************** *******************************
<from action="test.php" method="post">
here ar some fields, example NAME, SURNAME etc..
<here is submit buton>
</form>
************************************************** ******************************

and test1.php:
************************************************** *****************************
<form action="URL goes here" method="post">
<?
//here are params from test.html
$param1 = $_REQUEST['param1'];
$param2 = $_REQUEST['param2'];
$param3 = $_REQUEST['param3'];
$param4 = $_REQUEST['param4'];

//another var
$param5 = "abcabc";
$param6 = "123456"
?>
<submit button goes here>
</form>

So, how can i implement the test1.php, to get the params from test.html and then all params(include param5 and param6) post to the form action.

Thanks!
Aug 2 '07 #1
Share this Question
Share on Google+
4 Replies


kovik
Expert 100+
P: 1,044
So, how can i implement the test1.php, to get the params from test.html and then all params(include param5 and param6) post to the form action.
... You've lost me. You should either reword your question, or post more specific code.
Aug 2 '07 #2

P: 2
test.php
Expand|Select|Wrap|Line Numbers
  1. <form action="www.xyz.com" method="post">
  2. <?
  3. //here are params from test.html
  4. $param1 = $_REQUEST['param1'];
  5. $param2 = $_REQUEST['param2'];
  6. $param3 = $_REQUEST['param3'];
  7. $param4 = $_REQUEST['param4'];
  8.  
  9. //another var
  10. $param5 = "abcabc";
  11. $param6 = "123456"
  12. ?>
  13. <submit button goes here>
  14. </form>
How can I write the script test.php, so when I press the "submit" button, params(var): $param1, $param2, $param3, $param4, $param5, $param6. will posted in form action="www.xyz.com".

P.S I hope this question is clearly!
Aug 2 '07 #3

kovik
Expert 100+
P: 1,044
You mean you want to re-post posted variables?

You could load them into hidden fields.
Aug 3 '07 #4

nathj
Expert 100+
P: 938
You mean you want to re-post posted variables?

You could load them into hidden fields.
Alternatively, and I do this for an application 'form' that spans 3 pages, you could load them into the $_SESSION.

Cheers
nathj
Aug 3 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.