473,320 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

PHP Post, then HTML Post?

Can anyone do this?

Using PHP, I want to POST or GET some variables to a second php page.
This, I already know how to do.

However, on the second php page, I want to use a simple, standard HTML
form using the standard form-submitting method such as:

<form action="https://orderpage.ic3.com/hop/orderform.jsp"
method="post">

whereupon both sets of variables --- the earlier variables that were
POSTed or GETted to the second page, along with the standard form
variables derived within the second page --- will be POSTed to the
above URL.

In the second page, might I actually translate the received variables
into actual HTML code? For instance, if my first page POSTed the
variable xyz to the second page, then might the following code on the
second page receive that variable and then include it when the second
page's "Submit" button is pressed?

<? $xyz=$_POST['xyz']; ?>
<INPUT TYPE="HIDDEN" NAME="xyz" value="<?=$_POST['xyz']?>" >

Or how, otherwise, might this be done?

Thank you.

Sincerely,

Robert
Jul 17 '05 #1
2 2071
Robert wrote:
<? $xyz=$_POST['xyz']; ?>
<INPUT TYPE="HIDDEN" NAME="xyz" value="<?=$_POST['xyz']?>" >
Yes, this is OK (if you trust the user not to change the hidden value).
Or how, otherwise, might this be done?


With session variables and (for example) CUrl.

--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!
Jul 17 '05 #2
Robert wrote:
Can anyone do this?

Using PHP, I want to POST or GET some variables to a second php page.
This, I already know how to do.

However, on the second php page, I want to use a simple, standard HTML
form using the standard form-submitting method such as:

<form action="https://orderpage.ic3.com/hop/orderform.jsp"
method="post">

whereupon both sets of variables --- the earlier variables that were
POSTed or GETted to the second page, along with the standard form
variables derived within the second page --- will be POSTed to the
above URL.

In the second page, might I actually translate the received variables
into actual HTML code? For instance, if my first page POSTed the
variable xyz to the second page, then might the following code on the
second page receive that variable and then include it when the second
page's "Submit" button is pressed?

<? $xyz=$_POST['xyz']; ?>
<INPUT TYPE="HIDDEN" NAME="xyz" value="<?=$_POST['xyz']?>" >
Hi Robert,

What is your question/problem?
You just showed the correct code yourself.
Let the second page have a few hidden variables in the form that contain the
names and values posted by the first form.
Looks fine to me.

Or how, otherwise, might this be done?
Otherwise?
You could always use a pigeon to deliver the data.
;-)

Just stick with the method you described yourself.

Regards,
Erwin Moller

Thank you.

Sincerely,

Robert


Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sammmista | last post by:
hello experts, Plz dont treat this as another newbie query , i did my homework but still getting nowhere :( :( :( Trying to learn PHP on Fedora core 1 (PHP 4.3,MySQL,HTTPD).Unable to post data...
2
by: Erik Johnson | last post by:
I am trying to work with a program that is trying make an HTTP POST of text data without any named form parameter. (I don't know - is that a normal thing to do?) I need to write a CGI program that...
7
by: Rui Pestana | last post by:
Hello all, I want to use the POST method to submit the form and then grab the parameters in the asp file with request.form("parm"). The problem is that I am using the _search target to open...
12
by: Jan Roland Eriksson | last post by:
I have worked some more on this suggested new mFAQ version trying to get all user input to blend into the text. Another review by the NG would be welcome. ===== Archive-name:...
5
by: Jan Roland Eriksson | last post by:
Some more fine tuning and inclusion of last suggested text from regulars has been done to this test post #4 of the mFAQ. As usual, rip it up anywhere you feel that it's appropriate to do so. ...
8
by: Gert | last post by:
Hi, I have a form (server side) because of the filling of variables through the application. But now I need to post it to an url on submit. My .HTML form looks like this, but how to translate it...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
24
by: moriman | last post by:
Hi, The script below *used* to work. I have only just set up a server, PHP etc again on my Win98 system and now it doesn't? On first loading this page, you would have $p = and the button...
1
by: pmasclark | last post by:
Hello, I created a web site, site A, that redirects to another web site, site B, where a simple web service is hosted. The code to call the web service is simple. oWS.AllowAutoRedirect = True...
5
by: menriquez | last post by:
Hi...I am trying to write a test html/php app that accepts some POSTed XML data and replies with (for now) an echo of the $_POST array. Here is my index.htm.. <!DOCTYPE html PUBLIC "-//W3C//DTD...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.