[nycphp-talk] Can this be done with PHP or JavaScript? Is it even possible?
SolTek
soltek at mac.com
Fri Jul 19 20:57:49 EDT 2002
Sorry to stir up such a debate earlier, but I still do need help. :-)
Maybe someone can assist me. I'm actually just learning PHP and was
hoping to concentrate on that before learning anything else. But it
seems I may not have a choice.
I'm thinking this can only be done with JavaScript, but maybe I'm wrong.
Is there a way I can get form values that are on the same html page as a
form but outside of the form tags, and then pass them along with the
rest of a forms values when a submit button of a form is clicked? The
page must contain multiple forms. Each form will contain different
hidden values and a submit button. The form values outside of the form
tags will be associated with every form on the page which is why they
must also be sent along with the rest of the particular form's hidden
values. To help illustrate this I've included and commented the HTML
code I'm using below.
Many thanks to anyone who could help out!
- Steve
<p>STEP 1. ENTER YOUR DOMAIN NAME:
<!-- These values are associated with every form below -->
<input type="hidden" name="OptionName" value="Domain">
<input type="text" name="OptionValue" size="25"></p>
<p>STEP 2. CHOOSE A PLAN:</p>
<!-- Each plan must be in it's own individual form tags -->
<form action="https://domain.com/cgi-bin/webscr" method="post">
<p>PLAN A 3 MONTHS
<input type="hidden" name="item" value="PA03">
<input type="hidden" name="amount" value="74.85">
<input type="submit" name="submit"></p></form>
<form action="https://domain.com/cgi-bin/webscr" method="post">
<p>PLAN A 6 MONTHS
<input type="hidden" name="item" value="PA06">
<input type="hidden" name="amount" value="137.70">
<input type="submit" name="submit"></p></form>
<form action="https://domain.com/cgi-bin/webscr" method="post">
<p>PLAN A 12 MONTHS
<input type="hidden" name="item" value="PA12">
<input type="hidden" name="amount" value="239.40">
<input type="submit" name="submit"></p></form>
More information about the talk
mailing list