Thursday, October 20, 2011

[WD&D] Digest for sitedesign@googlegroups.com - 9 Messages in 2 Topics

Group: http://groups.google.com/group/sitedesign/topics

    ernest okojie <nestkojex@gmail.com> Oct 20 03:42PM +0100  

    i have a html code with three "select" fields but i want the three
    SELECT fields to go to the database in one field. How do i create
    that?
    the html code is
    <select name="year">
    <option value="1910">1910</option>
    <option value="1911">1911</option>
    <option value="1912">1912</option>
    <option value="1913">1913</option>
    <!--to current year-->
    <option value="2008">2008</option>
    </select>
     
    <select name="month">
    <option value="1">January</option>
    <option value="2">February</option>
    <option value="3">March</option>
    <!--etc...-->
    </select>
     
    <select name="days">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <!--etc...-->
    </select>
    thanks
     
    --
    Best Regards
    www.kojexconsult.com

     

    Liam Kenneth <liam.kenneth89@gmail.com> Oct 20 04:03PM +0100  

    Take each value and concatenate them to a variable and store that in to the
    DB.
     
    so i think something like this could work $dob = $_POST['year']
    + $_POST['month'] + $_POST['days'];
     
    I have never done it but i guess that is how its done. not sure if += is
    needed though im still a noob to php
     
    www.riak.uk.com
     

     

    Joe Kelly <jkelly.developer@gmail.com> Oct 20 08:24AM -0700  

    I could again show some trickery with jQuery to do it but it would be sent
    via AJAX at that point.
     

     

    Mark E <meckeard@gmail.com> Oct 20 11:43AM -0400  

    Why not just combine all 3 into a single textbox and collect the full date?

     

    Liam Kenneth <liam.kenneth89@gmail.com> Oct 20 05:05PM +0100  

    a single text box would suck unless you had a jquery calender that filled it
    in once you chosen your DOB
     

     

    Olivier Florence <oli.florence@gmail.com> Oct 20 05:08PM +0100  

    I think it would be more $dob = $_POST['year'] .'-' . $_POST['month'] . '-'.
    $_POST['days'];
    to have it in a MySQL ready to enter format providing the values passed are
    in format YYYY-MM-DD
     
    I would strongly recommend in validating the date before hand or else you
    will end with such dates as 2000-02-31 etc
     
    Olivier
     
     
     
     
     
    --
    Olivier Florence
    oli.florence@gmail.com
    www.flowebdesign.ie
    I am on Linked In <http://www.linkedin.com/in/olivierflorence>!
    Follow us on Facebook <https://www.facebook.com/flowebdesign>

     

    Mark E <meckeard@gmail.com> Oct 20 12:32PM -0400  

    There are plenty of free scripts for pop up calendars and it seems like an
    easier solution esp from the database side.

     

    Joe Kelly <jkelly.developer@gmail.com> Oct 20 10:24AM -0700  

    You can also use jQuery or plain old JS to construct a date object from the
    drop down values when they change and update the value of a hidden field
    with that string value of that date object. That hidden field would be the
    one posted up. Would at least keep that sort of thing on the view.
     

     

    Bazinga Designs <bazingadesigns@gmail.com> Oct 20 11:53AM +0200  

    Hi we can convert it for you for $200. Prefrerred CMS: WordPress contact
    bazingadesigns@gmail.com
     
    2011/10/20 <sitedesign@googlegroups.com>
     
    > To unsubscribe, email SiteDesign-unsubscribe@googlegroups.com
    > For more options, visit this group at
    > http://groups.google.com/group/SiteDesign?hl=en
     
    --
    BAZINGA Designs
     
    http://www.bazingadesigns.com
     
    Igor Wnuk
    Ul. PCK 5/20
    24-100 Puławy
     
    tel. 667 200 706
     
    REGON: 060622686
    NIP: 716-255-43-47

     

You received this message because you are subscribed to the Google Group sitedesign.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
You received this because you are subscribed to the "Web Design and Development" group at Google Groups. Messages are prefixed with [WD&D] in the subject. No spam is allowed. Be civil, be professional; try to be helpful & mind your netiquette. All posts are Copyright the original author and the Web Design and Development group. No reproduction of this content is allowed in any electronic or printed form outside the group at Google Groups and the http://www.WDaDg.org website. Any unauthorized use of our copy constitutes illegal Copyright infringement and may well be prosecuted to the full extent of the law. Digital Signature: $©"[W|D|&|D]g"|^|!SiteDesign@GG||#%$
To post to this group, email SiteDesign@googlegroups.com
To unsubscribe, email SiteDesign-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/SiteDesign?hl=en

No comments:

Post a Comment