Home > Backend Development > PHP Tutorial > Article recommendation system (2)_PHP tutorial

Article recommendation system (2)_PHP tutorial

WBOY
Release: 2016-07-21 16:06:36
Original
1190 people have browsed it

======APPRE.PHP==========
$strlen=strlen($articlemsg);
if($strlen<50){
echo "

";
echo ""; The length must be greater than 50 Chinese characters. Please resubmit the article.Thank you";
echo"";
echo"";
echo"
";
echo"Are you trolling me? In order to prevent some netizens from trolling you intentionally, I will The site stipulates that the article you submit ";
echo"
";
echo"【Resubmit article】 ;
";
echo"";
echo"";
echo"";
echo"";
echo"
| Return to homepage " | Recommended instructions > Search for articles
| ;Read the article                                                                                                                                                                                                                                      ;/a>
|
";

exit;
}
$strlen=strlen($name);
if($strlen<=1){
echo"";
echo"< ;tr align=center>";
echo"< tr>";
echo"
";
echo"Please enter your name correctly";
echo"
";
echo"【Resubmit article】  ";
echo"【Return to homepage】";
echo"
";
echo"";
echo"";
echo"";
echo"";
echo"
| Return to home page | Recommended instructions
                                                                                 
echo"
Read article
|
Contact the webmaster 🎜> 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"";
echo"";
echo"";
echo"
";
echo"The article you recommended already exists";
echo"
";
echo"Recommend the next article";
echo"< /td>
";
echo"If you are sure that this site does not have the article you recommended, please click< a href=mailto:webinfro@163.com>HereMeanwhile Bamboo Contact";
echo"
";
echo"【Repost a new article】";
echo"【Return to homepage】";
echo"
";
mysql_close($conn);
echo"";
echo"";
echo"";
echo"
| Return to home page Recommended description
| |                                                                                ";
echo"
Contact the webmaster > 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 "";
echo"
";
echo "The database record of this site shows that there is already a record with the same name as yours. Please change the name and re-publish the article";
echo"
";
echo"Repost article";
echo"Return to homepage";
echo"
";
mysql_close($conn);
echo"";
echo"";
echo"";
echo"";
echo"< ;/tr>";
echo"

|
Read article > echo" Contact the 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 cannot be separated from your support.The article you submitted has been accepted";
echo"
"; ;a href=appre.htm>Submit another article】";
echo"【Return to homepage】";
echo "
";
mysql_close($conn);
}
else{
echo"< table width=100% align=center>";
echo"";
echo"Sorry, there is an error in the article you submitted, please resubmit";
echo"";
echo"";
echo"【Re Submit】";
echo"【Return to homepage】";
echo"" ;
echo"";
mysql_close($conn);
}
echo" echo"";
echo"";
echo"";
echo"
| ";
echo"
| Recommended instructions ;td width=20%> Search article
| a href=article.php>Read article                                                                                                                                                                            com>Contact the webmaster
|
"; >?>



http://www.bkjia.com/PHPjc/315387.html

www.bkjia.com

true

http: //www.bkjia.com/PHPjc/315387.html

======APPRE.PHP========== $strlen=strlen( $articlemsg); if($strlen50){ echo table align=center width=100%; echo tr align=centertd; echo Are you talking nonsense? To prevent some netizens from being friendly...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template