Today is the second world for Project manager to guide the study of PHP practical projects

Source: Internet
Author: User
Tags explode

<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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.