Re: php form help...
| From: | Daniel Brown | Date: | Tue, 08 Jan 2008 16:34:39 +0000 |
| Subject: | Re: php form help... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266883@lists.php.net to get a copy of this message | ||
On Jan 8, 2008 11:19 AM, 2 Logic Studios <simiyu@2logicstudios.com> wrote:
> I am trying to create this kind of form
> http://www.12monthinternetmillionaire.com/affiliate.php
>
> a user inserts their clickbank id and its generated in the field
> below....any pointers ?
Yes. Hire a programmer. ;-P
In actuality, it could be done with JavaScript. However, because
JS won't modify the server settings, if you want to store the
ClickBank ID in a database, have it emailed, or whatever else, here's
the snippet of PHP code to generate the URL as they have it:
<?
if($_POST['clickbank_id']) {
$url = "http://".$_POST['clickbank_id'].".12monthmil.hop.clickbank.net";
// Perform whatever other actions you want here, but remember to
SANITIZE the $_POST data!
}
?>
<form method="post" action="<?=$_SERVER['PHP_SELF'];?>" />
ClickBank ID:
<input type="text" name="clickbank_id" /><br />
<input type="submit" value="Update ClickBank ID" />
</form>
<br />
<input type="text" value="<?=$url;?>" size="35" />
--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]
If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.