note 55960 added to language.functions

From: Date: Fri, 19 Aug 2005 02:28:54 +0000
Subject: note 55960 added to language.functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-93867@lists.php.net to get a copy of this message
With function, we can make simple our program with make form function. and then we can load the function in our form. You can see this sample Combo Box function. Like this: <?php function ComboBox($min, $max, $variabel) { echo "<select name=$variabel>"; for($i=$min; $i <= $max; $i++) { echo "<option value=$i>$i</option>"; } echo "</select>"; } ?> And then, we can load like this: <html> <head> <title>Menggunakan Combo Box Seleksi nama</title> </head> <body> <form action="SimpanProgram.php" method="post" name="form1" target="_self"> <?php include_once "FncComboBoxCek.php"; include_once "FncComboBoxCekBln.php"; $Bts=date('t'); // Jumlah hari $Tgl=date('d'); // Tanggal sekarang $Bln=date('m'); // Bulan sekarang $Thn=date('Y'); // Tahun sekarang echo "Tanggal penyetoran : "; echo ComboBox(1,$Bts,'TglLahir',$Tgl); echo ComboBoxBln(1,12,'BlnLahir',$Bln); echo ComboBox(1980,$Thn,'ThnLahir',$Thn); ?> </form> </body> </html> Tranks from STUDENT OF STMIK AKAKOM - JOGJAKARTA - INDONESIA ---- Manual Page -- http://www.php.net/manual/en/language.functions.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55960 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55960&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55960&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55960&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55960&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55960&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55960&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55960&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93867) next »