Results 1 to 9 of 9

Thread: I need a little help with a form

  1. #1
    Join Date
    May 2007
    Posts
    99
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Red face I need a little help with a form

    Hello everyone. Long time no see.

    In an effort not to have to bother anyone, I have been working on this form for the last 3 days, day and night. It works great now except for one thing. See where the date and time stamp are? They are supposed to be changing with each person who fills in the form, but they are staying the same as what's in the HTML I pasted. Obviously I made a big

    Can someone please tell me what I should be adding (or taking out) so the date and time register accurately?
    Thanks so much in advance!


    Code:
    <form action="http://www.aweber.com/scripts/addlead.pl" method="post" name="form1">
    <input name="user" id="user" value="My name" type="hidden"><a name="errors"></a><a name="errors">
    <input name="custom invitername" id="user" value="My name" type="hidden">
    <input name="custom inviterusername" id="user" value="My name" type="hidden">
    <input name="custom invitermail" id="user" value="Myemail@aol.com" type="hidden">
    <input name="custom inviterphone" id="user" value="555-555-5555" type="hidden">
    <input type="hidden" value="" id="user" name="custom phone">
    <input name="date" id="date" value="11/08/2008 11:56 AM" type="hidden">
    <input name="time" id="time" value="11/08/2008 11:56 AM" type="hidden">
    <input name="custom date" id="date" value="11/08/2008 11:56 AM" type="hidden">
    <input name="custom time" id="time" value="11/08/2008 11:56 AM" type="hidden">
    <input name="ipaddress" id="ip" value="96.250.22.67" type="hidden">
    <input name="custom ipaddress" id="ip" value="96.250.22.67" type="hidden">
    <input name="meta_web_form_id" value="1698772472" type="hidden"><input value="" name="meta_split_id" type="hidden">
    <input value="prospects" name="unit" type="hidden">
    <input id="redirect_1dd2c22469d63f9f40bff0a086570925" value="http://site.com/thankyou_addlead5.php" name="redirect" type="hidden">
    <input value="http://site.com/thankyou_addlead.php" name="meta_redirect_onlist" type="hidden">
    <input value="" name="meta_redirect_onlist" type="hidden">
    <input value="" name="meta_adtracking" type="hidden"><input value="1" name="meta_message" type="hidden">
    <input value="name,from,phone" name="meta_required" type="hidden">
    <input value="1" name="meta_forward_vars" type="hidden"></a>
    <br>
    <br>
    <br>
    <table cellspacing="0" cellpadding="0" border="0">
      <tr>
        <td><font face="Tahoma" size="1" color="#FFFFFF"><strong>Your Name:</strong></font></td>
        <td><input type="text" name="name" value size="20"></td>
      </tr>
      <tr>
        <td><font face="Tahoma" size="1" color="#FFFFFF"><strong>Your Email:</strong></font></td>
        <td style="padding-top: 2pt"><input type="text" name="from" value size="20"></td>
      </tr>
      <tr>
        <td><font face="Tahoma" size="1" color="#FFFFFF"><strong>Your Phone #:</strong></font></td>
        <td style="padding-top: 2pt"><input id="Phone" name="phone" value size="20"></td>
      </tr>
      <tr>
        <td><font face="Tahoma" size="1" color="#FFFFFF"><strong>How did you find me?</strong></font></td>
        <td style="padding-top: 2pt"><select size="1" id="how" name="adcode">
            <option>Choose One...</option>
            <option>Google</option>
            <option>YouTube</option>
            <option>Email</option>
            <option>MySpace ad</option>
            <option>Facebook ad</option>
            <option>Other</option>
          </select></td>
      </tr>
      <tr>
        <td align="center" colspan="2" style="padding-top: 2pt"><input type="submit" name="submit" value="Submit"></td>
        <tr>
          <td colspan="2" style="padding-top: 5pt">
            <div align="center">
              <p><font face="Arial" size="2" color="#FFFF66"><strong>We value your
              privacy!<br>
              </strong>Your info won't be sold or shared with any 3rd party.<br>
              You may opt-out at anytime.</font>
            </div>
          </td>
        </tr>
      </table>
      </form>
    Last edited by nycguurl; 11-10-2008 at 01:06 AM.

  2. #2
    Join Date
    Dec 2006
    Posts
    47
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default

    Well, you should study the date object or put this into your page just before the closing

    <script>
    document.forms[0].elements[6].value=new Date()

    </script>
    </body>
    </html>

  3. The Following User Says Thank You to Kenny For This Useful Post:

    nycguurl (11-10-2008)

  4. #3
    Join Date
    May 2007
    Posts
    99
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Wow... thank you so much! It worked like a charm!

    Would I use the same bit of code to make sure the person't unique IP registers, putting "ip" where "Date" was?

  5. #4
    Join Date
    Dec 2006
    Posts
    47
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default

    Sorry, can't help on that one. Ask again with a fresh thread.

  6. The Following User Says Thank You to Kenny For This Useful Post:

    nycguurl (11-10-2008)

  7. #5
    Join Date
    May 2007
    Posts
    99
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Thank you again Kenny.
    I don't know if people will be annoyed if I start a fresh thread on the same topic, so I'll try here first.

    Now that I have the time and date squared away with Kenny's fine help, does anyone out there (looking at my code above) know how to get the person's IP to register uniquely each time someone fills in the form? Right now they're all being reflected as the same one in the code. I tried Kenny's date thing for IP but it didn't apply.

    Please help me...

  8. #6
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    You need server-side for this. PHP:
    PHP Code:
    <input type="text" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>" />
    Hope that helps.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  9. The Following User Says Thank You to rangana For This Useful Post:

    nycguurl (11-11-2008)

  10. #7
    Join Date
    May 2007
    Posts
    99
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Thank you so much!

    I'm about to look really stupid, but do I totally delete this line?
    Code:
    <input name="ipaddress" id="ip" value="96.250.22.67" type="hidden">
    And replace it with yours?
    Code:
    <input type="text" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>" />

  11. #8
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Yes, but with slight modification to match that of yours:
    PHP Code:
    <input type="hidden" name="ipaddress" id="ip" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>" />
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  12. The Following User Says Thank You to rangana For This Useful Post:

    nycguurl (11-12-2008)

  13. #9
    Join Date
    May 2007
    Posts
    99
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I'll try it out!

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
  •