Verify the PHP code for the check box, as follows:
Copy the Code code as follows:
/*** Verify the validity of the check box in PHP*/$value = ' yes ';echo "Verify data ";if (Isset ($_post[' subscribe ')) {if ($_post[' subscribe ') = = $value)
1, submit button disabled
When the user submits, the button is immediately set to a unavailable state. This uses JS to achieve.
Before submissionCopy the Code code as follows:$ ("#submit"). attr (' disabled ', ' true ');$ ("#submit"). Val ("Being
For example, there are now and then. 3 pages. You want the user to start visiting the first page, then click Next to see "second page", and then before entering "third page", the user cannot
Back off. Let 1 and 2 be the same page. Leave a mark in
Here are some of the differences I found in the process of Doing Business station: (for reference only)
First, $_server[' server_name ' in Windows System, at the end there is/, there is no/under Linux. The following methods can be used to process
Syntax:strip_tags (String,allow);
String required, which specifies the strings to check.
Allow optional, which specifies the allowed tags, which are not deleted.
Note: This function will always strip HTML comments, which cannot be changed by the
Introduction of functions1, this function has four parameters, generally used in the use of the first two, the specific parameters can read the manual.
2. The first parameter is a JSON-formatted string, the second parameter is a Boolean value
PHP page to the variable on smarty template (used here, create two variables on Smarty instead)
Copy CodeThe code is as follows:
{Assign var= "name" Value= ' Richard.lee '}
{Assign var= "age" value= ' 27 '}
1. Want to output at a location in the
The main contents of this section:
Introduce a random display of the PHP function, more for the blog display window, the random display of photos and so on.
Example:Copy the Code code as follows:
/*** Function: Random display picture*
Copy CodeThe code is as follows:
Class Xtable
{
Private $tit, $arr, $fons, $sextra;
Public Function __construct ()
{
$this->tit=array (); Strings with titles for first row
$this->arr=array (); Data to show on cells
$this->fons=array ("#EEEEEE",
CodeIgniter is ideal for small-site application development, but its own view features may cause problems for front-end people who do not understand PHP. In contrast phpcms view template parsing is much more powerful, so here the Phpcms template
A time ago, when I wrote an API about mobile apps, it was always a query_string address, and it was a act parameter that distinguishes all the actions, which makes developers look more cost-sensitive. Originally wanted to be rewritten as "?
The thought of today, wrote a test of the PHP function code.
Copy CodeThe code is as follows:
/**
* Parameter Array $paramlist description
*
* The first-dimensional index of an array is the parameter name of the function that needs to be tested,
1. isset function: Determine whether the variable is initialized
Description: It does not determine if the variable is empty and can be used to determine if the element in the array has been definedNote: When using isset to determine if an array
You can modify the code to add some judgment:
Copy the Code code as follows:if (Empty ($_post[' name '])) {echo "As the saying goes, Yanguoliusheng people";}
ElseIf (Empty ($_post[' comment ')) {echo "Low oil, say a few more words ~";}else{$sql =
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