Greetings everyone,
First let me say that I am a 'backyard wannabee programmer'. ;-)
This question has to do with collecting information from a form and building a url
(with the variable data appended to the link) for processing by a script.
My question: How do I add the variable data to a url and then pass it to a php
script (The script to receive the data is html2pdf, but this could pertain to others as well.)
Here's what I have so far:
===== Start here =====
<form method="GET" action="
http://www.123xyz.com/book/book.php?book=sb&f1=abc123&f2=12345&send_pdf=yes">
<font>1st Affiliate ID<br>
<input type="hidden" name="book" value="sb">
<input type="text" size="12" name="f1">
2nd Affiliate ID#<br>
<input type="text" size="12" name="f2">
<input type="submit" VALUE="Submit It"></font>
</form>
<P><a href="
http://www.123xyz.com/book/book.php?book=sb&(f1}&{
f2}&send_p
df=yes">Cl
ick now for the book</a>.</P>
===== End here =====
The first line represents what you would see if the user entered abc123 as their first form entry (f1) and 12345
as their second entry, or (f2).
The last line is what I thought would work, until I started doing a lot more searching and reading. I know that
this can be done with cgi (don't know exactly how), but I think php is cleaner and more elegant, maybe?
What I would LIKE to do is have the visitor click the submit button, display what was typed with a "reset form"
button, in case of typos, and then show the newly built url for the visitor to click.
This code is in a standard .html page right now. Do I need to change the name to .php, and if so what are the
benefits?
Does it make any difference if I collect the data from one web page (or domain) and send it to the script which
is installed at another domain or web page?
Thanks in advance for your php expertise!
Ralph Moore
Start Free Trial