Have a simple button to add a subscription with todays date as start date

Discussion in 'Troubleshooting' started by bpbp, May 24, 2007.

  1. bpbp

    bpbp Member

    Joined:
    Aug 22, 2006
    Messages:
    31
    Hi I have all LIFETIME free subscriptions on my classifieds site which has amember integrated as the membership software.
    What i'm trying to do:

    When a member signs up for an "Advertiser's account (amember product=1, group=1)" - I want to have an option to sign-up for a "Reader's Account (amember product=2, group=2) with a simple input button

    This is the code i have:
    PHP:
    <form id="payment" name="payment" method="post" action="/amember/member.php">
     <
    input type="hidden" name="product_id" value="2" />
    <
    input type="submit" value="Get Reader's Account Now" />
    <
    input type="hidden" name="paysys_id" value="free" />
    <
    input type="hidden" name="action" value="renew" />
    </
    form>
    This code does add the subscription to user's account but it causes one problem:
    It creates a "Future" subscription in amember db starts on 2037-12-31 and ends on 2037-12-31

    I need the start_date to start "today"

    I've tried adding this line, but no success...
    PHP:
    <input type="hidden" name="start_date" value="<?php echo date('Y-m-d');?>" /> 
    I even tried replacing the "renew" input to the below:
    PHP:
    <input type="hidden" name="action" value="new" /> 
    Anyone has any idea how to use above form, but to have the start date to start on todays date, instead of in the "FUTURE"?
  2. deafdavid

    deafdavid Member

    Joined:
    Aug 28, 2006
    Messages:
    153
    bpbp,

    What type of software do you use for Classfied Ad? Are you using plugin for this?
  3. bpbp

    bpbp Member

    Joined:
    Aug 22, 2006
    Messages:
    31
    I have custom made software, which works around amember.

    But anyway, anyone can anyone help resolve my issue?

    Thanks in advance!
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Have a look to "Renewal Group" setting and its description in aMember product settings.
  5. bpbp

    bpbp Member

    Joined:
    Aug 22, 2006
    Messages:
    31
    Ok, i figured it out with your help. It's so simple to do, Thanks!

Share This Page