This program is always unable to submit data in the generated interface, always prompt with the asterisk information is not complete, but I did fill in the complete

Source: Internet
Author: User
This program is always unable to submit the data in the generated interface, always prompt with the asterisk information is not complete, but I did fill in the complete
This post was last edited by jackbill43 on 2013-08-15 15:09:41

Beginner's Advice




<title>Classroom Additions/Modifications</title>



Include_once ("base-class.php");

New SAE Database Class
$mysql = new Saemysql ();

Get the Classroom ID number that needs to be modified incoming
$class _id=intval ($_get["class_id"]);

Gets the operation ID of the incoming
$action =$_post["Action"];
$action = String::un_script_code ($action);
$action = string::un_html ($action);

Determine whether to modify, if the classroom ID passed in, database query to get all the content
if ($class _id)
{
$class _value= $mysql->getline ("SELECT * from class where class_id= $class _id");
if (! $class _value)
{
echo "";
Exit
}
}

If you get the Operation ID, enter or modify the operation
if ($action = = "Update")
{
Get form incoming data
$old _class_id=$_post["class_id"];
$class _name=$_post["Class_name"];
$class _number=$_post["Class_number"];
$class _fid=$_post["Class_fid"];
$class _status=$_post["Class_status"];

Incoming data filtering
$old _class_id=intval ($old _class_id);
$class _name= String::un_script_code ($class _name);
$class _number= String::un_script_code ($class _number);
$class _fid=intval ($class _fid);
$class _status= intval ($class _status);

Test Required Items
if (! $class _name | |! $class _number| |! $roster _status)
{
echo "";
Exit
}



Default parameters
$nowtime =date ("y/m/d h:i:s", Time ());
If you are modifying
if ($old _class_id)
{

$sql = "Update class set
Class_name= ' $class _name ',
Class_number= ' $class _number ',
Class_fid= ' $class _fid ',
class_status= ' $class _status ',
Edittime= ' $nowtime '
where class_id= $old _class_id ";
  • 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.