Results 1 to 5 of 5

Thread: pages that change content links depending on user id?

  1. #1
    Join Date
    Apr 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face pages that change content links depending on user id?

    Hi everyone,

    I have pages created with links to different services, websites and the like, and when you click on them, they go to these sites with my username or id for referrals.

    I am trying to figure out how to create these pages so that when my users advertise these same pages, the links inside automatically change to their information they would enter in their members section on my website, so that I do not get all their referrals to the linked sites. If this makes any sense.. I'm not so sure how to describe it.

    Like, if you go to http://trafficexchangeprofits.net/tr...d=tryingtohelp

    and look at the links, they are mine ... then you go to

    http://trafficexchangeprofits.net/tr...hp?id=moneyrev

    the page is identical but the links to the programs changes depending on the username or id information we entered in a form for the sites on the te website.

    This is what I would like to do with my site so that people wanting to advertise my pages, get credit for it and not me, if that makes better sense? but am not sure where to start.

    Any help would be so very greatly appreciated. Thank you so much for your valuable time

  2. #2
    Join Date
    Apr 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I know the script isn't in the page itself, but rather, in the site, it would look something like this I think, but I am DEFINITELY no programer.. don't know what to do with it if it IS right

    HTML Code:
    <form method='post' action='UBGscript.php/?page=pageidgoeshere'>
    	<div align='center'>
    
    	<table cellSpacing='0' cellPadding='0' bgColor='#ffffff' border='0' bordercolor='#ffffff'>
    <table align='center' width='100%' border='1'>
      	<tr>
        	<td vAlign='middle' align='center' width='90%'>
        	<font face='Trebuchet MS' size='2'>Enter Your TrafficWave 
                    <b>username ONLY</b></font></td>
    
        	<td align='left' width='10%'>
        	<font face='Trebuchet MS' size='2'>
        	<input class='TextBox' size='40' name='Mar4' value='eternalluster'></font>
                    </td>
      	</tr>
    
        	<tr align='middle'>
        	<td align='center' colSpan='2'><font face='Trebuchet MS' size='1'>
        	<input class='Button' type='submit' value='Edit Details' name='Submit'>
    
         	</font></td>
    	</form>
    Last edited by Snookerman; 04-27-2009 at 07:29 AM. Reason: added [html] tags

  3. #3
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    Take out the slash:
    Code:
    <form method='post' action='UBGscript.php?page=pageidgoeshere'>
    Hope this helps (and works!)

    // X96 \\
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  4. #4
    Join Date
    Apr 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question hoping this makes better sense

    Hi all, I am hoping someone here can help as I have been trying to figure this out for months!

    I need a script that: when a member fills in a form field with their referral id to the program listed and hits submit, the script updates the webpage they are advertising with their referral id's.

    It is the same exact page for everyone, but when they use this form it updates their version with their own id's. The only thing that changes is the url to the page as the end includes their user id for our site so the script knows who's link information goes on the page.

    Hope that makes better sense? Thank you so very very much to anyone that can help, this has been driving me insane :cry:

  5. #5
    Join Date
    Apr 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm not sure, but I think what you're looking for is something like...

    Code:
    <?php
    $link_table = array(
      'tryingtohelp' => array(
        'site1' => 'http://some.where/script/id1234',
        'site2' => 'http://other.place/whatever?ref=tryingtohelp'
      ),
      'moneyrev' => array(
        'site1' => 'http://some.where/script/id5678',
        'site2' => 'http://other.place/whatever?ref=moneyrev'
      )
    );
    
    $id = $_REQUEST['id'];
    
    echo <<<HTML
    <html><body>
    <!-- Some HTML goes here -->
    Wonderful stuff <a href='{$link_table[$id]['site1']}'>here</a>.
    And more wonderful stuff <a href='{$link_table[$id]['site2']}'>here</a>.
    <!-- More HTML goes here -->
    </body></html>
    
    HTML;
    
    # END
    Now when you visit

    this_script.php?id=tryingtohelp

    you get one set of links, and when you visit

    this_script.php?id=moneyrev

    you get a different set of links.

    Obviously, a lot more can be done to improve this script, but is that generally what you had in mind?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •