Article recommendation System (II.)

Source: Internet
Author: User
Tags exit strlen
======appre. php==========
$strlen =strlen ($articlemsg);
if ($strlen <50) {
echo "<table align=center width=100%>";
echo "<tr align=center><td>";
echo "Are you watering?" In order to prevent some netizens in good faith irrigation, this site stipulates that you submitted the article ";
echo "</td></tr>";
echo "<tr align=center><td>";
echo must be greater than 50 characters in length. Please submit your article again. Thank you ";
echo "</td></tr>";
echo "<tr><td align=center>";
echo "<a href=appre.htm>" resubmit the article "</a>";
echo "<a href=index.php>" back to the home page "</a>";
echo "</td></tr>";
echo "</table>";
echo "<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00ff00>";
echo "<tr>";
echo "<td width=20%>| <a href=index.php> back home </a> </td> ";
echo "<td width=20%> | <a Href=help.htm> Recommended Instructions </a>
|</td> ";
echo "<td width=20%> <a href=#> Search article </a>
| </td> ";
echo "<td width=20%> <a href=article.php> reading articles </a>
|</td> ";
echo "<td width=20%> <a href=mailto:webinfro@163.com> Contact webmaster </a>
|</td> ";
echo "</tr>";
echo "</table>";

Exit
}
$strlen =strlen ($name);
if ($strlen <=1) {
echo "<table align=center width=100%>";
echo "<tr align=center><td>";
echo "Please enter your name correctly";
echo "</td></tr>";
echo "<tr><td align=center>";
echo "" <a href=appre.htm> Resubmit article </a> "";
echo "" <a href=index.php> return home </a> "";
echo "</td></tr>";
echo "</table>";
echo "<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00ff00>";
echo "<tr>";
echo "<td width=20%>| <a href=index.php> back home </a> </td> ";
echo "<td width=20%> | <a Href=help.htm> Recommended Instructions </a>
|</td> ";
echo "<td width=20%> <a href=#> Search article </a>
| </td> ";
echo "<td width=20%> <a href=article.php> reading articles </a>
|</td> ";
echo "<td width=20%> <a href=mailto:webinfro@163.com> Contact webmaster </a>
|</td> ";
echo "</tr>";
echo "</table>";

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 "<table align=center width=100%>";
echo "<tr><td align=center>";
echo "You have recommended that the article already exists";
echo "</td>";
echo "<td align=center>";
echo "<a href=appre.htm> to recommend the next article </a>";
echo "</td></tr>";
echo "<tr><td align=center>";
echo "If you are sure this site does not have the article you recommend, please point <a href=mailto:webinfro@163.com> here </a> at the same time bamboo contact";
echo "</td></tr>";
echo "<tr><td align=center>";
echo "" <a href=appre.htm> new post </a> "";
echo "" <a href=index.php> return home </a> "";
echo "</td></tr>";
echo "</table>";
Mysql_close ($conn);
echo "<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00ff00>";
echo "<tr>";
echo "<td width=20%>| <a href=index.php> back home </a> </td> ";
echo "<td width=20%> | <a Href=help.htm> Recommended Instructions </a>
|</td> ";
echo "<td width=20%> <a href=#> Search article </a>
| </td> ";

echo "<td width=20%> <a href=article.php> reading articles </a>
|</td> ";
echo "<td width=20%> <a href=mailto:webinfro@163.com> Contact webmaster </a>
|</td> ";
echo "</tr>";
echo "</table>";

Exit;}
}
$sql = "Select *from article where Name= $name";
$result =mysql_query ($sql, $conn);
if ($result) {
if (Mysql_fetch_object ($result)) {
echo "<table width=100% align=center>";
echo "<tr align=center>";
echo "<td align=center>";
echo "site database records show that there is a record with your namesake, please change the name of a new article";
echo "</td></tr>";
echo "<tr><td align=center>";
echo "<a href=appre.htm> post </a>";
echo "<a href=index.php> back to Home </a>";
echo "</td></tr>";
echo "</table>";
Mysql_close ($conn);
echo "<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00ff00>";
echo "<tr>";
echo "<td width=20%>| <a href=index.php> back home </a> </td> ";
echo "<td width=20%> | <a Href=help.htm> Recommended Instructions </a>
|</td> ";
echo "<td width=20%> <a href=#> Search article </a>
| </td> ";
echo "<td width=20%> <a href=article.php> reading articles </a>
|</td> ";
echo "<td width=20%> <a href=mailto:webinfro@163.com> Contact webmaster </a>
|</td> ";
echo "</tr>";
echo "</table>";

Exit
}
}

echo $webadd 1;
$sql = "INSERT into article (NAME,WEBNAME,WEBADD,WEBLOGO,ARTICLENAME,ARTICLEAUTHOR,ARTICLEMSG) VALUES (' $name ', ' $ WebName ', ' $webadd ', ' $weblogo ', ' $articlename '
, ' $articleauthor '
, ' $articlemsg '
)";
Echo Mysql_errno (). ":". Mysql_error (). <br> ";
if (mysql_query ($sql, $conn)) {
echo "<table width=100% align=center>";
echo "<tr><td align=center>";
echo "Thank you, the development of the bamboo garden can not be separated from your support." The article you submitted has been accepted ";
echo "</td></tr>";
echo "<tr><td align=center>";
echo "" <a href=appre.htm> submit another article </a> "";
echo "" <a href=index.php> return home </a> "";
echo "</td></tr>";
echo "</table>";
Mysql_close ($conn);
}
else{
echo "<table width=100% align=center>";
echo "<tr><td align=center>";
echo "Sorry, the article you submitted appears wrong, please resubmit";
echo "</td></tr>";
echo "<tr><td align=center>";
echo "" <a href=appre.htm> Resubmit </a> "";
echo "" <a href=index.php> return home </a> "";
echo "</td></tr>";
echo "</table>";
Mysql_close ($conn);
}
echo "<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=00ff00>";
echo "<tr>";
echo "<td width=20%>| <a href=index.php> back home </a> </td> ";
echo "<td width=20%> | <a Href=help.htm> Recommended Instructions </a>
|</td> ";
echo "<td width=20%> <a href=#> Search article </a>
| </td> ";
echo "<td width=20%> <a href=article.php> reading articles </a>
|</td> ";
echo "<td width=20%> <a href=mailto:webinfro@163.com> Contact webmaster </a>
|</td> ";
echo "</tr>";
echo "</table>";

?>

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.