Article recommendation system (II) _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Article recommendation system (2 ). APPRE. PHP $ strlenstrlen ($ articlemsg); if ($ strlen50) {echotablealigncenterwidth100 %; echotraligncentertd; echo are you sprinkling? To prevent some network friendliness ====== APPRE. PHP ============
$ Strlen = strlen ($ articlemsg );
If ($ strlen <50 ){
Echo"



";Echo" ";Echo" ";Echo" ";Echo"
";
Echo "are you sprinkling water? To prevent some netizens from bumping in good faith, this site stipulates the articles you submitted ";
Echo"
";
Echo must contain more than 50 Chinese characters. Please submit the article again. Thank you ";
Echo"
";
Echo "[resubmit an article ]";
Echo "[Back to homepage ]";
Echo"
";
Echo"







";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo"
| Back to homepage| Recommendation description
|
Search for articles
|
Read articles
|
Contact webmaster
|
";

Exit;
}
$ Strlen = strlen ($ name );
If ($ strlen <= 1 ){
Echo"


";Echo" ";Echo" ";Echo"
";
Echo "Please enter your name correctly ";
Echo"
";
Echo "[resubmit an article ]";
Echo "[Back to homepage ]";
Echo"
";
Echo"







";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo"
| Back to homepage| Recommendation description
|
Search for articles
|
Read articles
|
Contact webmaster
|
";

Exit;
}
@ $ Conn = mysql_connect ("localhost", "user", "password ");
Mysql_select_db ("bamboo ");
$ SQL = "select * from article where articlename = '$ articlename '";
$ Result = mysql_query ($ SQL, $ conn );
If ($ result ){
If (mysql_fetch_object ($ result )){
Echo"




";Echo" ";Echo" ";Echo" ";Echo" ";Echo"
";
Echo "your recommended article already exists ";
Echo"
";
Echo "rerecommending the next article ";
Echo"
";
Echo "if you are sure that this site does not have any articles you have recommended, please click here and contact Bamboo ";
Echo"
";
Echo "[publishing a new article ]";
Echo "[Back to homepage ]";
Echo"
";
Mysql_close ($ conn );
Echo"








";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo"
| Back to homepage| Recommendation description
|
Search for articles
|
Read articles
|
Contact webmaster
|
";

Exit ;}
}
$ SQL = "select * from article where name = $ name ";
$ Result = mysql_query ($ SQL, $ conn );
If ($ result ){
If (mysql_fetch_object ($ result )){
Echo"



";Echo" ";Echo" ";Echo" ";Echo"
";
Echo "the database records on this site show that there is already a record with the same name as you. please try again by name ";
Echo"
";
Echo "publishing an article again ";
Echo "back to homepage ";
Echo"
";
Mysql_close ($ conn );
Echo"







";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo"
| Back to homepage| Recommendation description
|
Search for articles
|
Read articles
|
Contact webmaster
|
";

Exit;
}
}

Echo $ webadd1;
$ SQL = "insert into article (name, webname, webadd, weblogo, articlename, articleauthor, articlemsg) values ('$ name',' $ webname', '$ webadd ', '$ weblogo', '$ articlename'
, '$ Articleauthor'
, '$ Articlemsg'
)";
// Echo mysql_errno (). ":". mysql_error ()."
";
If (mysql_query ($ SQL, $ conn )){
Echo"


";Echo" ";Echo" ";Echo"
";
Echo "thank you! the development of bamboo garden is inseparable from your support. The article you submitted has accepted ";
Echo"
";
Echo "[submit another article ]";
Echo "[Back to homepage ]";
Echo"
";
Mysql_close ($ conn );
}
Else {
Echo"


";Echo" ";Echo" ";Echo"
";
Echo "Sorry, the article you submitted has an error. please submit it again ";
Echo"
";
Echo "[resubmit ]";
Echo "[Back to homepage ]";
Echo"
";
Mysql_close ($ conn );
}
Echo"







";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo"
| Back to homepage| Recommendation description
|
Search for articles
|
Read articles
|
Contact webmaster
|
";

?>

Http://www.bkjia.com/PHPjc/315387.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/315387.htmlTechArticle======APPRE.PHP========== $ strlen = strlen ($ articlemsg); if ($ strlen50) {echo table align = center width = 100%; echo tr align = centertd; echo are you pouring water? To prevent some network friendliness...

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.