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 "are you sprinkling water? To prevent some netizens from bumping in good faith, this site stipulates the articles you submitted ";
Echo" |
";Echo"
";
Echo must contain more than 50 Chinese characters. Please submit the article again. Thank you ";
Echo" |
";Echo"
";
Echo "[resubmit an article ]";
Echo "[Back to homepage ]";
Echo" |
";Echo"
";
Echo"
";Echo"
";Echo"
| | Back to homepage | ";Echo"
| Recommendation description
| | ";Echo"
Search for articles
| | ";Echo"
Read articles
| | ";Echo"
Contact webmaster
| | ";Echo"
";Echo"
";
Exit;
}
$ Strlen = strlen ($ name );
If ($ strlen <= 1 ){
Echo"
";Echo"
";
Echo "Please enter your name correctly ";
Echo" |
";Echo"
";
Echo "[resubmit an article ]";
Echo "[Back to homepage ]";
Echo" |
";Echo"
";
Echo"
";Echo"
";Echo"
| | Back to homepage | ";Echo"
| Recommendation description
| | ";Echo"
Search for articles
| | ";Echo"
Read articles
| | ";Echo"
Contact webmaster
| | ";Echo"
";Echo"
";
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 "your recommended article already exists ";
Echo" | ";Echo"
";
Echo "rerecommending the next article ";
Echo" |
";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"
";
Echo "[publishing a new article ]";
Echo "[Back to homepage ]";
Echo" |
";Echo"
";
Mysql_close ($ conn );
Echo"
";Echo"
";Echo"
| | Back to homepage | ";Echo"
| Recommendation description
| | ";Echo"
Search for articles
| | ";Echo"
Read articles
| | ";Echo"
Contact webmaster
| | ";Echo"
";Echo"
";
Exit ;}
}
$ SQL = "select * from article where name = $ name ";
$ Result = mysql_query ($ SQL, $ conn );
If ($ result ){
If (mysql_fetch_object ($ result )){
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"
";
Echo "publishing an article again ";
Echo "back to homepage ";
Echo" |
";Echo"
";
Mysql_close ($ conn );
Echo"
";Echo"
";Echo"
| | Back to homepage | ";Echo"
| Recommendation description
| | ";Echo"
Search for articles
| | ";Echo"
Read articles
| | ";Echo"
Contact webmaster
| | ";Echo"
";Echo"
";
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 "thank you! the development of bamboo garden is inseparable from your support. The article you submitted has accepted ";
Echo" |
";Echo"
";
Echo "[submit another article ]";
Echo "[Back to homepage ]";
Echo" |
";Echo"
";
Mysql_close ($ conn );
}
Else {
Echo"
";Echo"
";
Echo "Sorry, the article you submitted has an error. please submit it again ";
Echo" |
";Echo"
";
Echo "[resubmit ]";
Echo "[Back to homepage ]";
Echo" |
";Echo"
";
Mysql_close ($ conn );
}
Echo"
";Echo"
";Echo"
| | Back to homepage | ";Echo"
| Recommendation description
| | ";Echo"
Search for articles
| | ";Echo"
Read articles
| | ";Echo"
Contact webmaster
| | ";Echo"
";Echo"
";
?>
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...