Welcome Guest, Not a member yet? Register   Sign In
Can somebody tell me where I'm going wrong with "callback_" ?
#2

[eluser]Jason W[/eluser]
And heres my view file:
Code:
<?php echo form_open("age"); ?>
<table id="signupTable">

    <tr>
        <td class="title">Date of Birth:</td>
        <td class="field_cell">

            &lt;!-- DOB DAY --&gt;

            <select name="dob_d">

                <option value="">Day</option>

                &lt;?php                            

                    $day_array = array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31");

                    foreach($day_array as $key => $day){                        

                        if($day == $dob_d) {

                            printf(

                                "<option value=\"%s\" selected>%s</option>\n",                                    

                                $day,

                                $day

                            );

                        }

                        else {

                            printf(

                                "<option value=\"%s\">%s</option>\n",                                    

                                $day,

                                $day

                            );

                        }

                    }

                ?&gt;

            </select> -

            

            &lt;!-- DOB MONTH --&gt;

            <select name="dob_m">

                <option value="">Month</option>                        

                &lt;?php                            

                    $month_array = array("Jan" => "01", "Feb" => "02", "Mar" => "03", "Apr" => "04", "May" => "05", "Jun" => "06", "Jul" => "07", "Aug" => "08", "Sep" => "09", "Oct" => "10", "Nov" => "11", "Dec" => "12");

                    foreach( $month_array as $key => $month){                        

                        if($month == $dob_m) {

                            printf(

                                "<option value=\"%s\" selected>%s</option>\n",                                    

                                $month,

                                $key

                            );

                        }

                        else {

                            printf(

                                "<option value=\"%s\">%s</option>\n",                                    

                                $month,

                                $key

                            );

                        }                            

                    }

                ?&gt;

            </select> -        

            

            &lt;!-- DOB YEAR --&gt;

            <select name="dob_y"">

                <option value="">Year</option>

                &lt;?php

                    $current_year = date("Y");

                    $start_year = $current_year - 100;
                    echo $current_year." - ".$start_year;

                    while($current_year >= $start_year) {                        

                        if($current_year == $dob_y) {

                            printf(

                                "<option value=\"%s\" selected>%s</option>\n",                                    

                                $current_year,

                                $current_year

                            );

                        }

                        else {

                            printf(

                                "<option value=\"%s\">%s</option>\n",                                    

                                $current_year,

                                $current_year

                            );

                        }    

                        $current_year--;

                    }

                ?&gt;

            </select>
            &lt;?php echo form_error('dob_d'); ?&gt;
            &lt;?php echo form_error('dob_m'); ?&gt;
            &lt;?php echo form_error('dob_y'); ?&gt;
            &lt;?php echo form_error('age_check'); ?&gt;

        </td>
        <td class="required">*</td>

    </tr>    

    <tr>

        <td colspan="3">

            &lt;?php echo form_hidden("dobcheck")."\n"; ?&gt;

            &lt;?php echo form_hidden("type", " p")."\n"; ?&gt;

            &lt;?php echo form_hidden("submitform")."\n"; ?&gt;

            &lt;input type="submit" value="Signup Now" /&gt;

        </td>

    </tr>
</table>


Messages In This Thread
Can somebody tell me where I'm going wrong with "callback_" ? - by El Forum - 10-17-2009, 04:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB