Xinglin classmates (5)_PHP tutorial
Jul 21, 2016 pm 04:04 PM
密碼查詢:class/querypsw.php
include "config.php";
//詢問班級(jí)注冊問題密碼
if ($class){
$headers .= "Content-Type: text/html; charset=gb2312n"; // Mime type
$subject="詢問班級(jí)注冊問題密碼 "; //主題
$message=nl2br($message);
$message="查詢?nèi)耍?.$name."
留言:
".$message;?????//內(nèi)容
???mail($superemail,$subject,$message,$headers);
???echo "恭喜您,您的請求已經(jīng)向管理員發(fā)出,近期內(nèi)請注意查收email。";
???exit;
??}
??//詢問個(gè)人注冊密碼
??if ($member){??
??$result = mysql_query("SELECT * FROM user where user='$username'",$db);
??if (mysql_num_rows($result)==0){??//若返回列的數(shù)目為0,說明無此資料
echo "我們的數(shù)據(jù)庫中無此用戶,請確認(rèn)。注意大小寫。返回";
exit;}
???$myemail=mysql_result($result,0,"email");//讀取user數(shù)據(jù)庫中的email
????if (!$myemail){?????????????????????????//如果還沒有email,則返回
?????echo "我們的數(shù)據(jù)庫中沒有您的email,請?jiān)俅翁顚憽?a href='javascript:history.back()'>返回";
?????exit;
????}
$psw=mysql_result($result,0,"psw");??????//密碼
$name=mysql_result($result,0,"name");????//姓名
$subject="詢問個(gè)人注冊密碼";
$message=$name.",您好。您的用戶名是".$username.",密碼是".$psw."。
-----------------------
".$sitename."";??????//信件內(nèi)容
$headers .= "Content-Type: text/html; charset=gb2312n"; // Mime type
mail($myemail,$subject,$message,$headers);
???echo "恭喜您,系統(tǒng)已經(jīng)向您的信箱中發(fā)出了答復(fù)信件,請注意查收email。";
???exit;
??}
?>??
?? ?????????? 詢問密碼 ?????????? ???????? | |
?????????? ???????? | ?????????? ???????? ???????? ???????? |
悄悄話:privatenote.php
session_start(); // 開始session
if(!session_is_registered("userregister")||($userregister==""))//檢查是否注冊,如userregister未注冊或session為空值,重新注冊.
{
echo "請重新注冊
";
exit;
}
//刪除留言
include "config.php";
if ($del=="1"){
mysql_query("delete from privatenote where id='$id'",$db); //以id為刪除標(biāo)志
echo "刪除成功!";
}
//添加留言
if ($Submit){
$id=time();?????????????????????//以時(shí)間戳為記錄號(hào)
$time=date("Y年m月d日 h:i:s A");//留言時(shí)間
$result = mysql_query("SELECT * FROM user where user='$userregister'",$db);
$fromuser=mysql_result($result,0,'name');???????????????????????//發(fā)消息人姓名
$result = mysql_query("SELECT * FROM user where name='$yname'",$db);
$touser=mysql_result($result,0,'user'); ;??????????//接受人用戶名
$message=nl2br(strip_tags($ynote));//留言內(nèi)容
mysql_query("INSERT INTO privatenote (id,fromuser,touser,time,message) values ('$id','$fromuser','$touser','$time','$message')",$db); //寫入數(shù)據(jù)庫
echo "留言成功!";
}
?>
?? ?????? ![]() ?????? ???? | |
?? ?????? ?????? $result = mysql_query("SELECT * FROM user where user='$userregister'",$db); $name=mysql_result($result,0,"name");//姓名 echo $name; ?> ??????的悄悄話 ??????? | ????????????????????????????????????????????????>$result = mysql_query("SELECT * FROM privatenote where touser='$userregister' ORDER BY time DESC",$db); |
???? |

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

To reduce the size of HTML files, you need to clean up redundant code, compress content, and optimize structure. 1. Delete unused tags, comments and extra blanks to reduce volume; 2. Move inline CSS and JavaScript to external files and merge multiple scripts or style blocks; 3. Simplify label syntax without affecting parsing, such as omitting optional closed tags or using short attributes; 4. After cleaning, enable server-side compression technologies such as Gzip or Brotli to further reduce the transmission volume. These steps can significantly improve page loading performance without sacrificing functionality.

HTMLhasevolvedsignificantlysinceitscreationtomeetthegrowingdemandsofwebdevelopersandusers.Initiallyasimplemarkuplanguageforsharingdocuments,ithasundergonemajorupdates,includingHTML2.0,whichintroducedforms;HTML3.x,whichaddedvisualenhancementsandlayout

It is a semantic tag used in HTML5 to define the bottom of the page or content block, usually including copyright information, contact information or navigation links; it can be placed at the bottom of the page or nested in, etc. tags as the end of the block; when using it, you should pay attention to avoid repeated abuse and irrelevant content.

ThetabindexattributecontrolshowelementsreceivefocusviatheTabkey,withthreemainvalues:tabindex="0"addsanelementtothenaturaltaborder,tabindex="-1"allowsprogrammaticfocusonly,andtabindex="n"(positivenumber)setsacustomtabbing

Adeclarationisaformalstatementthatsomethingistrue,official,orrequired,usedtoclearlydefineorannounceanintent,fact,orrule.Itplaysakeyroleinprogrammingbydefiningvariablesandfunctions,inlegalcontextsbyreportingfactsunderoath,andindailylifebymakingintenti

loading="lazy" is an HTML attribute for and which enables the browser's native lazy loading function to improve page performance. 1. It delays loading non-first-screen resources, reduces initial loading time, saves bandwidth and server requests; 2. It is suitable for large amounts of pictures or embedded content in long pages; 3. It is not suitable for first-screen images, small icons, or lazy loading using JavaScript; 4. It is necessary to cooperate with optimization measures such as setting sizes and compressing files to avoid layout offsets and ensure compatibility. When using it, you should test the scrolling experience and weigh the user experience.

The key to using elements to represent navigation link areas is semantics and clear structure, usually in conjunction with organizational links. 1. The basic structure is to put the parallel links in and wrap them inside, which is friendly to auxiliary tools and is conducive to style control and SEO; 2. Commonly used in or, for placing main navigation or footer link collections; 3. A page can contain multiple areas, such as main menu, sidebar or footer independent navigation.

The answer to the question is that the password error prompt may be caused by keyboard layout, case recognition, or installer source. The macOS installation interface uses an American English keyboard by default. The input of non-English keyboards may not match. It is recommended to switch layouts or avoid special characters; the password is case-sensitive, and it is recommended to check the CapsLock status or try all lowercase; if the installer comes from another Mac, you need to enter the Mac password to make the installer; you can also try to re-download the installer through recovery mode, confirm the administrator account identity, or format the disk with disk tools first.
