I am creating an affiliates resources page. And I have seen this done before but not sure how to make this work. I have made many premade links on my page to make it easy for my affiliates to set up their links. Now they could manually replace the xxxxxxx in all the links for their own clickbank ID. But I saw a website recently that had a text entry box and a submit button. The id was entered into the text box and when submit was clicked, all the links on the page were now updated with the id that was entered into the text box placed were the xxxxxxxx where in all the links on the page. http://xxxxxxxx.vendor.hop.clickbank.net/ This is a real time saver for the affiliate. Does anyone know what to do to make this work? This is the form behind the submit button. But how are all the links updated? <form method="post" action=""> <font size="5"><b><a linkindex="0" href="http://vendor.reseller.hop.clickbank.net" target="_blank">Clickbank</a> Username: </b></font><input size="12" maxlength="12" name="Clickbank_Nickname" type="text"> <input value="submit" name="submit" type="submit"> </form> Code (markup): Thanks in advance Ps here is the page that does this: http://daytradingrobot.com/inside-affiliates.php
Not totally sure what you wanna do, but you would use Php to process the form in the Action area, <form method="post" action="form.php"> <font size="5"><b><a linkindex="0" href="http://vendor.reseller.hop.clickbank.net" target="_blank">Clickbank</a> Username: </b></font><input size="12" maxlength="12" name="Clickbank_Nickname" type="text"> <input value="submit" name="submit" type="submit"> </form> <?php // form.php if (isset($_POST['Clickbank_Nickname'])) { echo $_POST['Clickbank_Nickname']; } ?> PHP:
If you take a look at the page here: Ps here is the page that does this: http://daytradingrobot.com/inside-affiliates.php you will see that you can enter your affiliate ID eg, "mycbaff" and when you click submit button all the hopinks in th page are updated with "mycbaff" in the hoplinks. It's really cool and I cant see how its done. It fills in ALL the links in the page. Thanks
Ok I'm almost there, but... After playing around with it for a while I realised that this part: <?php // form.php if (isset($_POST['Clickbank_Nickname'])) { echo $_POST['Clickbank_Nickname']; } ?> Code (markup): Is in the same page as the form, as this code also displays the updated data the "nickname". So I almost have it working as I need it to. Except as it is now, it displays no data until it is entered into the submit box and submitted. That is it does not show xxxxxxxxx as the placeholder for a nick name. Just in case a newbie wants to manually change the xxxxxxxxx manually. So how would I still be able to show xxxxxxxxx as the place holder until someone puts in their nickname and presses submit. I am real grateful for your help here. Thank you. ps I thought this would do it: if (isset($_POST['Clickbank_Nickname'])) { echo $_POST['Clickbank_Nickname']; else echo "xxxxxxxx"; } Code (markup): But no it couldn't have been that easy. Any ideas, anyone?