PHP Post, then HTML Post?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert

    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.c om/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="<?=$_POS T['xyz']?>" >

    Or how, otherwise, might this be done?

    Thank you.

    Sincerely,

    Robert
  • Pedro Graca

    #2
    Re: PHP Post, then HTML Post?

    Robert wrote:[color=blue]
    > <? $xyz=$_POST['xyz']; ?>
    > <INPUT TYPE="HIDDEN" NAME="xyz" value="<?=$_POS T['xyz']?>" >[/color]

    Yes, this is OK (if you trust the user not to change the hidden value).
    [color=blue]
    > Or how, otherwise, might this be done?[/color]

    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!

    Comment

    • Erwin Moller

      #3
      Re: PHP Post, then HTML Post?

      Robert wrote:
      [color=blue]
      > 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.c om/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="<?=$_POS T['xyz']?>" >[/color]

      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.
      [color=blue]
      >
      > Or how, otherwise, might this be done?[/color]

      Otherwise?
      You could always use a pigeon to deliver the data.
      ;-)

      Just stick with the method you described yourself.

      Regards,
      Erwin Moller


      [color=blue]
      >
      > Thank you.
      >
      > Sincerely,
      >
      > Robert[/color]

      Comment

      Working...