For advice, about PHP write message board Code
I just started to learn PHP, learn to write code to do the message board, who help me to see why the page did not write "reply" and "delete" option???
Session_Start ();
$lydb =new lydb ();
if (Isset ($_post["type"])) {
if ($_post["type"]== "Insert") {
if (Authority::check_insert () ==true) {
$lydb->insert ($_post["nickname"), "style/avatar/". $_post["Avatar"],$_post["message"]);
Header ("Location:indexy.php");
Exit ();
}
}
else if ($_post["type"]== "login") {
if (Isset ($_post["username") && isset ($_post["password"]) {
$dd =user::validate ($_post["username"],$_post["password"]);
if ($dd ==true) {
$_session["username"]=$_post["username"];
Header ("Location:indexy.php");
Exit ();
}
else{
}
}
}
else if ($_post["type"]== "reply") {
$id =$_post["id"];
$reply =$_post["Reply"];
$lydb->reply ($id, $reply);
Header ("Location:indexy.php");
Exit ();
}
}
else if (isset ($_get["type"])) {
if ($_get["type"]== "delete" && isset ($_get["id"])) {
if (Authority::check_delete () ==true) {
$lydb->delete_by_id ($_get["id"]);
Header ("Location:indexy.php");
Exit ();
}
}
else if ($_get["type"]== "logout") {
Session_destroy ();
Header ("Location:indexy.php");
Exit ();
}
}
Header ("Content-type:text/html;charset=utf-8");
?>
<title>Simple message Book</title>
Administrator Login
You are welcome:
Exit
Simple message Ben qq:1264897620
?>
Current section Page
Shared Page
Show per page Reviews
Shared Message
"> Previous page
"> Next page
Home
"> Last
@yaokun qq:1264897620
------to solve the idea----------------------
Too long, not really looking.
"class=" Reply_button "> Reply
The > Delete
should be Authority::check_delete () =false, so the following did not execute, of course no reply and deleted the
------to solve the idea----------------------
Reference:
Administrator Login problems, there is a "delete" and "reply" function can not be implemented. What may be the reason Ah, is not a database connection problem???
That block has permission to verify that your current user in the library does not have permission to both actions
------to solve the idea----------------------
Cache!! It's not possible to delete it!!!
------to solve the idea----------------------
Citation: It's
true, don't know why? It was clean and the Recycle Bin was emptied ...
Do not want you to empty the Recycle Bin, is to delete the browser cache ...