Use Php or wordpress to create a search box

Source: Internet
Author: User
Tags wordpress php
I want to create a multi-function search box by using Php or wordpress program. I don't know how to implement it. I only need to perform keyword search in the last box for the general effect of the wordpress program, please kindly advise. W. use Php or wordpress to create a search box
I want to create a multi-function search box, but I don't know how to implement it. I use the wordpress program.
General Results
If you want to perform a keyword search in the last box, please kindly advise. WordPress PHP search
------ Solution --------------------
1. Yes.
2. output the SQL statement and check whether the stitching is correct.
------ Solution --------------------
Submit various parameters to the server. then, the server program concatenates the SQL statement and the SQL statement is OK.
------ Solution --------------------
Obtain the parameters when submitting the request.
------ Solution --------------------
Reference:
Reference: 1. Yes.
2. output the SQL statement and check whether the stitching is correct.


Use $ _ POST ['name'] in the background to set the name and id to unique.
------ Solution --------------------
$ _ POST ['name'] is used when the background receives data.
Name is the name value of your input box.
Try this.
If (isset ($ _ POST ['name']) {
Echo $ _ POST ['name'];
}


The form sending method can be set to post or get.

For details, go to w3school.
------ Solution --------------------
SQL can handle $ _ post ['text box name']
------ Solution --------------------
If all input names are "s", post can only get the last value, that is, the keyword. You need to change the name of each input to a different one, and then use $ _ POST ['input name'] in the background to obtain the corresponding value.

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.