Php MySQL garbled after running
/* Member information deletion page */
Require_once ("D:/appserv/www/mr/01/webshop/conn/Conn_DB.php"); // contains the database link file
If ($ _ GET ['m _ id']! = "" & $ _ GET ["Type"]! = "")
{
$ Mid = $ _ GET ['m _ id']; // gets the passed member ID
$ Type = $ _ GET ["Type"]; // Obtain the passed operation type
$ Str = "";
Switch ($ type)
{
Case "1 ":
$ Str = "update Member_Info set M_Status = 1 where M_ID =". $ _ GET ['mid ']; // update the statement
Break;
Case "2 ":
$ Str = "update Member_Info set M_Status = 2 where M_ID =". $ _ GET ['mid ']; // update the statement
Break;
Case "3 ":
$ Str = "delete from Member_Info where M_ID =". $ _ GET ['mid ']; // delete a statement
Break;
}
$ I = mysql_query ($ str); // execute an SQL statement
If ($ I) // judge the execution result
{
Echo "script" alert ('Operation successful! '); Window. location. href =' ../member_manager.php 'script ";
}
Else
{
Echo "script alert ('Operation failed! '); Window. location. href =' ../member_manager.php 'script ";
}
}
Else
{
Echo "script" alert ('Please reselect the member information you want to operate! '); Window. location. href =' ../member_manager.php 'script ";
}
?>
This is part of the code
Reply to discussion (solution)
This will happen after running.
You posted no garbled content
Why is that?
No gibberish. are you just learning programming?
Well, isn't that abnormal?
$ I = mysql_query ($ str );
This sentence is changed
$ I = mysql_query ($ str) or die (mysql_error (); // Check the error message
It is still the same as before. I can send this complete information to you and run it for me to see if this program is a problem?
The student party asks for help, which is an example on the internet. could you help me to see this program!