Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

php form help...

0 views
Skip to first unread message

2 Logic Studios

unread,
Jan 8, 2008, 11:19:41 AM1/8/08
to php-g...@lists.php.net
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 ?

Daniel Brown

unread,
Jan 8, 2008, 11:34:39 AM1/8/08
to 2 Logic Studios, php-g...@lists.php.net

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.

Daniel Brown

unread,
Jan 8, 2008, 12:00:07 PM1/8/08
to 2 Logic Studios, PHP General List
On Jan 8, 2008 11:56 AM, 2 Logic Studios <sim...@2logicstudios.com> wrote:
> Daniel,
>
> Thanks...worked like a charm....

My pleasure. Just remember to sanitize the code as I said if
you're going to do anything other than display it in the text box.
Otherwise, a malicious user (or possibly even a typographical error)
could lead to problems.

Eric Butera

unread,
Jan 8, 2008, 12:12:42 PM1/8/08
to Daniel Brown, PHP General List
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

You think someone who didn't even know how to get post data in the
first place knows how to properly sanitize it? :)

Daniel Brown

unread,
Jan 8, 2008, 12:14:24 PM1/8/08
to Eric Butera, PHP General List
On Jan 8, 2008 12:12 PM, Eric Butera <eric....@gmail.com> wrote:
> You think someone who didn't even know how to get post data in the
> first place knows how to properly sanitize it? :)

Maybe, maybe not, but the point is to mention that it should be
done to allow further exploration and study to learn how it's done.

Jack Mays

unread,
Jan 8, 2008, 12:17:04 PM1/8/08
to PHP General List
>
> You think someone who didn't even know how to get post data in the
> first place knows how to properly sanitize it? :)
>

One would think that the OP would lookup "sanitize" or some form of that
search in google to become more familiar with the term and what it
means, but then again I probably give to much credit to most of the
population :)

--
Jack Mays

tedd

unread,
Jan 8, 2008, 12:52:07 PM1/8/08
to Jack Mays, PHP General List

As I tell my grand-kids, half the people you meet everyday are below
average intelligence.

Cheers,

tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

Philip Thompson

unread,
Jan 8, 2008, 5:04:04 PM1/8/08
to PHP General List
On Jan 8, 2008, at 11:52 AM, tedd wrote:

> At 11:17 AM -0600 1/8/08, Jack Mays wrote:
>> >
>>> You think someone who didn't even know how to get post data in the
>>> first place knows how to properly sanitize it? :)
>>>
>>
>> One would think that the OP would lookup "sanitize" or some form of
>> that search in google to become more familiar with the term and
>> what it means, but then again I probably give to much credit to
>> most of the population :)
>>
>> --
>> Jack Mays
>
> As I tell my grand-kids, half the people you meet everyday are below
> average intelligence.
>
> Cheers,
>
> tedd


I guess this ruins my impression of you being this 28 y/o
programmer... grandpa! ;)

Hehehe

~Phil

tedd

unread,
Jan 8, 2008, 5:24:28 PM1/8/08
to PHP General List

Yeah, I'm a little old -- but I'm still very good-looking, extremely
smart and humble.

I'm old enough to remember gas stations where the attendant would
hand-pump gas up into a glass container and then would gravity feed
it into your tank. I actually knew people who were alive during the
civil war. And as everyone knows on this list, I used to program with
rocks.

But, I now play xbox (Call of Duty 4 rules) and my gamer tag is "special tedd".

Daniel Brown

unread,
Jan 8, 2008, 5:27:12 PM1/8/08
to Philip Thompson, PHP General List
On Jan 8, 2008 5:04 PM, Philip Thompson <philth...@gmail.com> wrote:
> I guess this ruins my impression of you being this 28 y/o
> programmer... grandpa! ;)
>
> Hehehe

No, they just start raising families at a very young age. Tedd is
only about seven years older than his children.

0 new messages