<tr>
<TD width= ">" Brand </td>
<td>
<?php echo sqlselect (' goods where 1=1 ', ' Brand ', ' select ', ' Brand ', '-Please select brands-');?>
</td>
</tr>
/********** Database Filter Menu ********************************************************/
/**
* Value is ID when display function
* @param string $SqlForm table name + conditional admin WHERE id = ' $id '
* @param string $SqlId front end the value to display is typically a database field
* @param the title of string $SqlColumn front page display
* @param string $title The default display---select--
* @param string $value The ID of the default value
*/
function Sqlselect ($SqlForm, $SelectName, $class, $SqlColumn, $title) {
$SEARCHSQL = mysql_query ("select * FROM {$SqlForm}");
while ($Search = Mysql_fetch_array ($SEARCHSQL)) {
$key = $Search [$SqlColumn];
$option [$key] = $key;
}
Return Select ($SelectName, $class, $title, $option);
}
/**********option Print function ********************************************************/
/**
* Print function
* @param string $title default first option
* @param array $option option set Array (' Male ', ' female ')
* @param string $value Default User selected
* @return Return results
*/
function option ($title, $option, $value) {}
<tr>
<TD width= > Language </td>
<td>
<select name= "Olanguage" class= "select Textprice" >
<?php echo option ('-Please select language-', explode (', ', ' website (' language ')), $value);? >
</select>
</td>
</tr>
/********** Output Web site custom text ********************************************************/
function website ($id) {
$website = Query ("website", "webid = ' $id '");
return $website [' text '];
}
/********** split string to numeric **************/
Explode (' Boundary character ', ' split string ');
/************* Split paragraph ************/
."".
/*************** read date back to front page ******************/
<TD width= "> Delivery date </td>
<td>
<?php
$DARR = Explode ("-", $res [' deliverydate ']);
Echo year ("Year", ' Select ', ', $DARR [0]). Moon (' Moon ', ' select ', $DARR [1]). Day (' Day ', ' select ', $DARR [2]); >
</td>
/***************** Domain Name Value-receiving method *******************/
$id = $get [' id '];
/************** query Single Data execution mode *****************/
$res = Query ("Buycar", "id= ' $id '");
/**
* Vlaue is the ID number of the menu
* @param string $SqlForm table name +
* @param string $SelectName Select control Name Select Name= ""
* @param string $class The class of the control
* @param string $SqlId value ID <option value> </option>
* @param string $SqlColumn front page displays the title <option value> title</option>
* @param string $title The default display---select--
* This value is selected by default when @param string $value has a value
*/
function Idselect ($SqlForm, $SelectName, $class, $SqlId, $SqlColumn, $title, $value) {
$SEARCHSQL = mysql_query ("select * FROM {$SqlForm}");
while ($Search = Mysql_fetch_array ($SEARCHSQL)) {
$key = $Search [$SqlId];
$option [$key] = $Search [$SqlColumn];
}
Return Select ($SelectName, $class, $title, $option, $value);
}
function Select ($name, $class, $title, $option, $value) {
$result = "
<select name= ' {$name} ' class= ' {$class} ' >
". Option ($title, $option, $value)."
</select>
";
Returns a full drop-down menu
return $result;
}
<!--//Manage Controls--
<tr>
<TD width= ">" Brand </td>
<td>
<?php echo idselect (' goods where 1=1 ', ' Brand ', ' select ', ' Brand ', ' brand ', '-Please choose branding-', $goods [' Brands ']);?>
</td>
</tr>
Today is the second world for Project manager to guide the study of PHP practical projects