My Forum source code Ten

Source: Internet
Author: User
reguse.inc.php information when processing a registered user
function Regok ($mess, $reginfo)//record after successful output user information
{
echo "
";echo "





















";echo " "; echo " ";echo " "; echo " ";echo " "; echo " ";echo " "; echo " ";echo " "; echo " ";echo " "; echo " ";echo " "; echo " ";echo " "; echo " ";echo " "; echo " ";$reginfo = $reginfo [0];echo " ";echo "
". $mess."
ID Number: ". $reginfo [13]."User: ". $reginfo [0]."
Password: ". $reginfo [1]."Home: ". $reginfo [9]."
Mailbox: ". $reginfo [8]."Oicq ". $reginfo [3]."
Nickname: ". $reginfo [2]."Grade: ". $reginfo [11]."
Gender: ". $reginfo [4]."Age: ". $reginfo [5]."
Occupational: ". $reginfo [6]."From: ". $reginfo [7]."
Information confidentiality: ". $reginfo [12]."Signature: ". $reginfo [10]."
Email Notification: ". $reginfo [18]."Registration time: ". $reginfo [15]."
Login time: ". $reginfo [16]."Avatar:
User Login
";
}
Check information and write records
function Reg ($usename, $usepass, $usemail, $useweb, $useni, $useoicq, $usesex, $useage, $usezy, $useaddr, $useinf, $usety, $USEBQ, $USEQM)
{
if ($usename)//If a user name is passed in, the user registration module is processed
{
if (strlen ($usename) >8) return 1;
else if (strlen ($usepass) >8) return 2;
else if (strlen ($USEOICQ) >12) return 3;
else if (!uinfo ($usepass, pass)) return 4;
else if (!uinfo ($usename, name)) return 5;
else if (!uinfo ($USEOICQ, OICQ)) return 6;
else if (!uinfo ($usemail, Mail)) return 7;
Else
{
if (! $useinf) $useinf = 2;
$query = "SELECT * from Useinfo where usename= '". $usename. "'"; Whether the user already exists
$req =mysql_query ($query);
$USEINFP =mysql_fetch_array ($req);
if ($USEINFP [0]) return 8;
Else
{
$time =date (y year N month J Day g time I);
$USEQM =nl2br ($USEQM); Write User Information
$query = "INSERT into Useinfo (Usename,usepass,usemail,useweb,useni,useoicq,usesex,useage,usezy,useaddr,useinf, Usety,usebq,useqm,useattr,regdate,enddate) VALUES (' ". $usename." ', ' ". $usepass." ', ' ". $usemail." ', ' ". $useweb." ', ' " . $useni. "', '". $useoicq. "', '". $usesex. "', '". $useage. "', '". $usezy. "', '". $useaddr. "', '". $useinf. "', '". $usety. "', '" ". $usebq." ', ' ". $useqm." ', 1,now (), ' ". $time." ') ";
$req =mysql_query ($query);
if ($req)
{
$query = "SELECT * from Useinfo where usename= '". $usename. "'"; Remove user information, and outgoing user-side
$req =mysql_query ($query);
$useinfo =mysql_fetch_array ($req);
return $useinfo;
}
else return 10;
}
}
return 9;
}
}
function usemess ($mess, $usename, $usemail, $useweb, $useni, $useoicq, $USEADDR, $USEQM)//Information Entry Form
{
echo "";
}
function Dlmes ($mess)
{
echo "
"; echo "
";
echo "
";
}
?>

The above is the introduction of my forum source code 10, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.