Forum Moderators: open
i have a form that i want to customize with radio buttons. i want members to insert their affiliate id ($rrlm) into a "text" field, then they must select 1 of 3 radios. the radio values will represent 1 to 3 urls. i'd like the affiliate id to be inserted in to the url's (site links) upon submission, if left blank, then defaults to system id.
i believe i'm on the right path with using arrays but not sure how to insert id into url's or how to write this... do i use loops, do i create php file for form action for url info, do i create an includes function (insert in index.php)? unfamiliar with the steps & places to put information.
Below is my idea & the form html i have up to this point.
what i'd like to do:
Form -
First Name _____
Last Name ______
PayPal Email _____
Clickbank ID _____
RRLM ID ______
RRLM Member Level
O RRLM 1
O RRLM 2
O RRLM 3
where RRLM 1 means
"[$rrlm].company1.com";
"[$rrlm].company2.com";
"[$rrlm].company3.com";
where RRLM 2 means
"[$rrlm].company2.com";
"[$rrlm].company3.com";
where RRLM 3 means
"[$rrlm].company3.com";
RRLM ID from the previous text filed is inserted where the variable $RRLM appears in the link(s) of the selected radio.
array concept thus far, definitely not sure if this is right,
$RRLM[0]=
"[$rrlm].company1.com";
"[$rrlm].company2.com";
"[$rrlm].company3.com";
$RRLM[1]=
"[$rrlm].company2.com";
"[$rrlm].company3.com";
$RRLM[2]=
"[$rrlm].company3.com";
current form code (where input - rrlm id - i want 3 radio buttons to follow. member can only select one & 1 must be selection if an rrlm id is typed in):
<form action='$_SERVER[PHP_SELF]' method=post>
<p align=center>
<table style='font-size: 12px;'>
<tr><td colspan=2 align=center bgcolor=#ffffcc><b>$ttext Account</b></td></tr>
<tr><td>firstname:</td><td><input type=text name=firstname size=30 value='$user[firstname]'></td></tr>
<tr><td>lastname:</td><td><input type=text name=lastname size=30 value='$user[lastname]'></td></tr>
<tr><td>email:</td><td>$user[email]</td></tr>
<tr><td>paypal email:</td><td><input type=text name=pp size=30 value='$user[pp]'></td></tr>
<tr><td>clickbank id:</td><td><input type=text name=cb size=30 value='$user[cb]'></td></tr>
<tr><td>rrlm id:</td><td><input type=text name=rrlm size=30 value='$user[rrlm]'></td></tr>
<tr><td colspan=2><i>Leave password fields blank to keep current password.</i></td></tr>
<tr><td>password:</td><td><input type=password name=password1 size=30></td></tr>
<tr><td>confirm password:</td><td><input type=password name=password2 size=30></td></tr>
<tr><td colspan=2 align=center><input type=submit value='Update My Account'></td></tr>
</table>
<input type=hidden name=action value=account2>
<input type=hidden name=id value=$user[id]>
</p>
</form>
thank you for any help & suggestions,
mic
after the radio buttons & also in a pdf product, i plan to have, learn more hyperlinks, i.e. after radios - Learn more about RRLM 1 (with RRLM 1 as hyperlink), Learn more about RRLM 2, etc.
for example, if an affiliate types in their RRLM id and selects radio button 2, [$rrlm].company2.com will appear in the "Learn more... hyperlink" in the .pdf and also in the form "Learn more... hyperlink" for RRLM 2 & RRLM 3 (not RRLM 1), since this member level only allows promotion of urls for company 2 & 3...
form:
"[$rrlm].company2.com";
"[$rrlm].company3.com";
and
pdf:
To learn more click here (with "click here" hyperlinking to [$rrlm].company2.com since this is the highest level fo the 2)
Or must another array/action be written for this?
Thank you greatly,
Mic