DST Posted November 8, 2010 Report Share Posted November 8, 2010 Kā var uztaisīīt ja no mysql izvelk datus piemeram no manu dzimsanas datus nu menesi lai vinus uzstadīdu vajag šo html kodu. <select name="mm"> <option value="00">---</option> <option value="01">Janvāris</option> <option value="02">Februāris</option> <option value="03">Marts</option> <option value="04">April</option> <option value="05">May</option> <option value="06">June</option> <option value="07">July</option> <option value="08">August</option> <option value="09">Septembris</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> UN kad gribi labot nevis lai vins rada pirmo bet to kuru tu esi ievadijis. Ceru ka sapratat. Link to comment Share on other sites More sharing options...
whatafak Posted November 8, 2010 Report Share Posted November 8, 2010 nesapratu Link to comment Share on other sites More sharing options...
*jancis38* Posted November 8, 2010 Report Share Posted November 8, 2010 Vienkārši izvelc dzimšanas datumu no datubāzes, tad apstrādā to ar list un explode. Šādi: <? $dob = "01.01.1990"; list ($date, $month, $year) = explode(".", $dob); ?> Un tad tālāk dari šādi: <select name="dob_month"> <option value="00">---</option> <option <? if ($month == "01") { echo "selected=\"selected\" "; } ?>value="01">Janvāris</option> ... </select> Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now