7. Building an automatic news publishing system for your website)

Source: Internet
Author: User
In the previous section, our news system has been able to add and delete news online, but this is not enough, some users may need to find related news entries in a previous topic. However, a News system that is better than others can't help but complete this function.
Now let's add the retrieval function (full text/title) to our news system. First, let's make a retrieval form. See the following HTML code, place the code on the web page that requires news retrieval. You can easily complete news search.
Form method = "POST" action = "http://XXX..com.cn/cgi-win/search/search.asp"
P select name = "select" size = "1"
Option selected value = "search_1" news search (title)/option
Option value = "search_2" news search (full text)/option
/Select, input type = "text" name = "key" size = "20", input type = "submit" value = "search"
Name = "search"/p
Add the search ASP program search. asp on the basis of this FORM. In the form, we use the key parameter to indicate the string to be matched, while the select parameter specifies whether to search based on the full text or the title.
Now go to the program processing section and check out our search. asp program.
* Search. asp
'% @ Language = "vbscript" %'
If request. form ("key") = "" then
Response. redirect "/"
End if
Select case request. form ("select ")
Case "search_1"
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.