Today is the second day of the project manager's Guide to learning PHP combat projects

Source: Internet
Author: User
Tags explode

Recently more impetuous uneasy, has resisted learning PHP, in the side of the friend carefully guided, slowly calm down the heart. I am so happy to have such a good opportunity to study while working.

<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 ');

2017.08.18 Notes on

Today is the second day of the project manager's Guide to learning PHP combat 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.