-3

下面显示了在 php 中实现表单验证以检测空字段或不需要的字符并警告错误消息作为输出的示例。我在这项工作中没有任何功劳,我几乎没有将它们复合以适应我自己的网站需求。这只是为了分享我的代码,因为我之前确实发现了一些困难。下面的答案确实提供了一个更先进的解决方案,但我无法让它发挥作用,这不是他们的问题,而是由于我在 php 方面的新手技能。

所以我基本上只是展示了帮助以前像我这样的新手的基本步骤。下面的代码显示了一个非常基本的 php 表单验证,并在用户按下提交时通过电子邮件发送到特定的电子邮件地址。

<?php
   $me =$_SERVER['REQUEST_METHOD']; 
 if ($_POST['mail']=='' && $me =="POST") { //remember in the input tag,set name as 'mail' and in form tag set action to " "; 

$name = preg_replace('/[^A-Za-z]/','', $_POST['name']);//filter all letters only
$tel = preg_replace('/[^0-9]/','', $_POST['tel']);//filter all number only
//$email$regex credit to Adam Khoury www.developphp.com
$email = $_POST['email'];
$regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/'; 

$comments = preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&-]/s', '', $_POST['comments']); //allow alphanumeric only

$error_status = false;//set default error status as false

if (empty($email)){ //empty in the field, it should go through these codes, remember don't put any value in the input tag thou, or else it will detect it as the default value
$error_email='<h4>Please fill in your email</h4>';
$error_status = true; //error status toggle
} else
if (preg_match($regex, $email)) { //if this is to ensure the format of email correctly entered
   } else { 
     $error_email='<h4>This is an invalid email. Please try again.</h4>';
     $error_status = true;
} 


if (empty($name)){
$error_name= '<h4>Please Fill Your Name</h4>';
$error_status = true;
} 

if (empty($tel)){
$error_tel ='<h4>Please Fill Your Contact Number</h4>';
$error_status = true;
}

if (empty($comments)){
$error_comments ='<h4>Please give us comments</h4>';
$error_status = true;
}


if(!$error_status) {
$success='<h4>Thanks for your comments. We will reply to you shortly</h4>';
$to_address="someone@gmail.com";
$subject="Online Comments";

$message="Input from online comments box.\n\n";
$message .="Name: ".$name."\n";
$message .="Tel: ".$tel."\n";
$message .="Email: ".$email."\n";
$message .="Comments: ".$comments."\n";

mail($to_address, $subject, $message);
unset($name,$tel,$email,$comments);
}
}

?>
4

3 回答 3

1

您检查表单字段是否首先发布并在例如 cart.php 中有效,例如:

if(is_numeric($_POST["quantity"]) && $_POST["quantity"]>0) {
 $each_item['quantity']=$_POST["quantity"];
}

现在您正在检查数量是数字而不是零。您可以对更多字段执行此操作,具体取决于您构建检查的类型,例如:

if(!empty($_POST["customer_name"])) {
 $customerName=$_POST["customer_name"];
}

对于更高级的验证,您可以使用正则表达式:preg-match

于 2013-07-31T08:33:42.033 回答
1

你的问题出在你的 if 语句中

替换这个:

if (empty($_POST['customer_name']) $err[] = "Username field is required";  
if (empty($_POST['tel_num']) $err[] = "Comments field is required";  

和:

if (empty($_POST['customer_name'])) {
  $err[] = "Username field is required";
  }  
if (empty($_POST['tel_num'])) {
  $err[] = "Comments field is required";  
}

问题是你在那个站立)之后错过了一个。)

所以你有这个:

empty($_POST['customer_name']) //notice 1 (

但它必须是这样的:

empty($_POST['customer_name'])) //notice 2 (

您也可以使用短标签 ( <?) 打开 php,但最<?php好像在其他脚本中一样使用

编辑

在 cart.php 中,您应该使用以下代码:

<?php  
if ($_SERVER['REQUEST_METHOD']=='POST') {  
  $err = array();
  //performing all validations and raising corresponding errors
  if (empty($_POST['customer_name'])) {
  $err[] = "Username field is required";
  }  
  if (empty($_POST['tel_num'])) {
  $err[] = "Comments field is required";  
  }

  if (empty($err)) {  
    //if no errors - saving data and redirect
    header("Location: ".$_SERVER['PHP_SELF']);
    exit;
  }  else {
    // all field values should be escaped according to HTML standard
    foreach ($_POST as $key => $val) {
      $form[$key] = htmlspecialchars($val);
    }
  }
} else {
  $form['customer_name'] = 'm;
  $form['tel_num'] = '';  
}
include 'form.tpl.php';
?>  

EDIT2 我再次检查了您问题中的代码。我找不到任何问题。我确实做了一些小改动

我认为当您使用此脚本时,它应该可以工作:

<?php
    session_start();
    /* Created by Adam Khoury @ www.developphp.com */

    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    // Connect to the MySQL database  
    include "storescripts/connect_to_mysqli.php";

    // Determine which page ID to use in our query below ---------------------------------------------------------------------------------------
    if (!empty($_GET['pid'])) {
        $pageid = 1;
    } else {
        $pageid = preg_replace("[^0-9]", "", $_GET['pid']); // filter everything but numbers for security
    }

    // Query the body section for the proper page
    $sqlCommand = "SELECT pagebody FROM pages WHERE id='$pageid' LIMIT 1";
    $query = mysqli_query($myConnection, $sqlCommand) or die(mysqli_error());
    while ($row = mysqli_fetch_array($query)) {
        $body = $row["pagebody"];
    }
    mysqli_free_result($query);
    //---------------------------------------------------------------------------------------------------------------------------------------------------------------
    // Query the module data for display ---------------------------------------------------------------------------------------------------------------
    $sqlCommand = "SELECT modulebody FROM modules WHERE showing='1' AND name='footer' LIMIT 1";
    $query = mysqli_query($myConnection, $sqlCommand) or die(mysqli_error());
    while ($row = mysqli_fetch_array($query)) {
        $footer = $row["modulebody"];
    }
    mysqli_free_result($query);
    //---------------------------------------------------------------------------------------------------------------------------------------------------------------
    // Query the module data for display ---------------------------------------------------------------------------------------------------------------
    $sqlCommand = "SELECT modulebody FROM modules WHERE showing='1' AND name='custom1' LIMIT 1";
    $query = mysqli_query($myConnection, $sqlCommand) or die(mysqli_error());
    while ($row = mysqli_fetch_array($query)) {
        $custom1 = $row["modulebody"];
    }
    mysqli_free_result($query);
    //---------------------------------------------------------------------------------------------------------------------------------------------------------------
    // Build Main Navigation menu and gather page data here -----------------------------------------------------------------------------


    $sqlCommand = "SELECT id, linklabel FROM pages WHERE showing='1' ORDER BY id DESC";
    $query = mysqli_query($myConnection, $sqlCommand) or die(mysqli_error());

    $menuDisplay = '';
    while ($row = mysqli_fetch_array($query)) {
        $pid = $row["id"];
        $linklabel = $row["linklabel"];
        $menuDisplay .= '<a href="index.php?pid=' . $pid . '">' .
                $linklabel . '</a><br />';
    }
    mysqli_free_result($query);
    //---------------------------------------------------------------------------------------------------------------------------------------------------------------
    //mysqli_close($myConnection); 
    // This file is www.developphp.com curriculum material
    // Written by Adam Khoury January 01, 2011
    // http://www.youtube.com/view_play_list?p=442E340A42191003
    // Script Error Reporting
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //       Section 1 (if user attempts to add something to the cart from the product page)
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if (isset($_POST['pid'])) {
        $pid = $_POST['pid'];
        $wasFound = false;
        $i = 0;
        // If the cart session variable is not set or cart array is empty
        if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) < 1) {
            // RUN IF THE CART IS EMPTY OR NOT SET
            $_SESSION["cart_array"] = array(0 => array("item_id" => $pid, "quantity" => 1));
        } else {
            // RUN IF THE CART HAS AT LEAST ONE ITEM IN IT
            foreach ($_SESSION["cart_array"] as $each_item) {
                $i++;
                while (list($key, $value) = each($each_item)) {
                    if ($key == "item_id" && $value == $pid) {
                        // That item is in cart already so let's adjust its quantity using array_splice()
                        array_splice($_SESSION["cart_array"], $i - 1, 1, array(array("item_id" => $pid, "quantity" => $each_item['quantity'] + 1)));
                        $wasFound = true;
                    } // close if condition
                } // close while loop
            } // close foreach loop
            if ($wasFound == false) {
                array_push($_SESSION["cart_array"], array("item_id" => $pid, "quantity" => 1));
            }
        }
        header("location: cart.php");
        exit();
    }

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //       Section 2 (if user chooses to empty their shopping cart)
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if (isset($_GET['cmd']) && $_GET['cmd'] === 'emptycart') {
        unset($_SESSION["cart_array"]);
    }

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //       Section 3 (if user chooses to adjust item quantity)
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if (isset($_POST['item_to_adjust']) && $_POST['item_to_adjust'] != "") {
        // execute some code
        $item_to_adjust = $_POST['item_to_adjust'];
        $quantity = $_POST['quantity'];
        $quantity = preg_replace('#[^0-9]#i', '', $quantity); // filter everything but numbers
        if ($quantity >= 100) {
            $quantity = 99;
        }
        if ($quantity < 1) {
            $quantity = 1;
        }
        if (empty($quantity)) {
            $quantity = 1;
        }
        $i = 0;
        foreach ($_SESSION["cart_array"] as $each_item) {
            $i++;
            while (list($key, $value) = each($each_item)) {
                if ($key == "item_id" && $value == $item_to_adjust) {
                    // That item is in cart already so let's adjust its quantity using array_splice()
                    array_splice($_SESSION["cart_array"], $i - 1, 1, array(array("item_id" => $item_to_adjust, "quantity" => $quantity)));
                } // close if condition
            } // close while loop
        } // close foreach loop
    }

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //       Section 4 (if user wants to remove an item from cart)
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if (isset($_POST['index_to_remove']) && $_POST['index_to_remove'] !== '') {
        // Access the array and run code to remove that array index
        $key_to_remove = $_POST['index_to_remove'];
        if (count($_SESSION["cart_array"]) <= 1) {
            unset($_SESSION["cart_array"]);
        } else {
            unset($_SESSION["cart_array"][$key_to_remove]);
            sort($_SESSION["cart_array"]);
        }
    }

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //       Section 5  (render the cart for the user to view on the page)
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    $cartOutput = "";
    $cartTotal = "";
    $pp_checkout_btn = '';
    $product_id_array = '';

    if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) < 1) {
        $cartOutput = "<h3 align='center'>Your shopping cart is empty</h3>";
    } else {
        // Start PayPal Checkout Button

        $pp_checkout_btn .= '<form action="http://chenlikpharmacy.freeserver.me/order_list.php" method="post">
    <input type="hidden" name="cartOutput" value = "$cartOutput">';

        // Start the For Each loop
        $i = 0;
        foreach ($_SESSION["cart_array"] as $each_item) {
            $item_id = $each_item['item_id'];
            $sqlCommand = "SELECT * FROM products WHERE id='$item_id' LIMIT 1";
            $sql = mysqli_query($myConnection, $sqlCommand);
            while ($row = mysqli_fetch_array($sql)) {
                $product_name = $row["product_name"];
                $price = $row["price"];
                $details = $row["details"];
            }
            $pricetotal = $price * $each_item['quantity'];
            $cartTotal = $pricetotal + $cartTotal;
            setlocale(LC_MONETARY, "en_US");
            $pricetotal = money_format("%10.2n", $pricetotal);
    // Dynamic Checkout Btn Assembly

            $pp_checkout_btn .= '<input type="hidden" name="item_name[]" value="' . $product_name . '">
    <input type="hidden" name="amount[]" value="' . $price . '">
    <input type="hidden" name="quantity[]" value="' . $each_item['quantity'] . '">  ';
            // Create the product array variable
            $product_id_array .= "$item_id-" . $each_item['quantity'] . ",";
            // Dynamic table row assembly
            $cartOutput .= "<tr>";
            $cartOutput .= '<td><a href="product.php?id=' . $item_id . '">' . $product_name . '</a><br /><img src="inventory_images/' . $item_id . '.jpg" alt="' . $product_name . '" width="40" height="52" border="1" /></td>';
            $cartOutput .= '<td>' . $details . '</td>';
            $cartOutput .= '<td>RM' . $price . '</td>';
            $cartOutput .= '<td><form action="cart.php" method="post">
            <input name="quantity" type="text" value="' . $each_item['quantity'] . '" size="1" maxlength="2" />
            <input name="adjustBtn' . $item_id . '" type="submit" value="change" />
            <input name="item_to_adjust" type="hidden" value="' . $item_id . '" />
            </form></td>';
            //$cartOutput .= '<td>' . $each_item['quantity'] . '</td>';
            $cartOutput .= '<td>' . $pricetotal . '</td>';
            $cartOutput .= '<td><form action="cart.php" method="post"><input name="deleteBtn' . $item_id . '" type="submit" value="X" /><input name="index_to_remove" type="hidden" value="' . $i . '" /></form></td>';
            $cartOutput .= '</tr>';
            $i++;
        }
        setlocale(LC_MONETARY, "ms_MY");
        $cartTotal = money_format("%10.2n", $cartTotal);
        $cartTotal = "<div style='font-size:18px; margin-top:12px;' align='right'>Cart Total : " . $cartTotal . " MYR</div>";
        // Finish the Paypal Checkout Btn
        $pp_checkout_btn .= '<input type="hidden" name="custom" value="' . $product_id_array . '">
    Name: <input type="text" name="customer_name">
    <br/>
    Tel: <input type="text" name="tel_num">

        <input type="submit" value="Submit">
        </form>';
    }

    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        $err = array();
        //performing all validations and raising corresponding errors
        if (empty($_POST['customer_name'])) {
            $err[] = "Username field is required";
        }
        if (empty($_POST['tel_num'])) {
            $err[] = "Comments field is required";
        }

        if (empty($err)) {
            //if no errors - saving data and redirect
            header("Location: " . $_SERVER['PHP_SELF']);
            exit;
        } else {
            // all field values should be escaped according to HTML standard
            foreach ($_POST as $key => $val) {
                $form[$key] = htmlspecialchars($val);
            }
        }
    } else {
        $form['customer_name'] = '';
        $form['tel_num'] = '';
    }
    include 'form.tpl.php';
    ?>  
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
        <head>
            <title>CHENLIK PHARMACY ONLINE CATALOGUE</title>
            <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
            <link rel="shortcut icon" href="css/images/favicon.ico" />
            <link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
            <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
            <script type="text/javascript" src="js/jquery.jcarousel.min.js"></script>
            <!--[if IE 6]>
            <script type="text/javascript" src="js/png-fix.js"></script>
            <![endif]-->
            <script type="text/javascript" src="js/functions.js"></script>
        </head>
        <body>
            <!-- Header -->
            <div id="header" class="shell">
                <div id="logo">
                    <h1><a href="http://chenlikpharmacy.freeserver.me/index.php">Chenlik Pharmacy Sdn. Bhd.</a></h1><span><a href="http://chenlikpharmacy.freeserver.me">Serve with Care & Passion</a></span></div>

                <!-- Navigation -->
                <div id="navigation">
                    <ul>
                        <li><a href="http://chenlikpharmacy.freeserver.me/index.php" >Home</a></li>
                        <li><a href="http://chenlikpharmacy.freeserver.me/product_list.php">Products</a></li>
                        <li><a href="http://chenlikpharmacy.freeserver.me/promotions.php">Promotions</a></li>
                        <li><a href="http://chenlikpharmacy.freeserver.me/profile.php">Profile</a></li>
                        <li><a href="http://chenlikpharmacy.freeserver.me/about_us.php" class="active">About Us</a></li>
                        <li><a href="http://chenlikpharmacy.freeserver.me/contacts.php" >Contacts</a></li>
                    </ul>
                </div>

                <!-- End Navigation -->

                <div class="cl">&nbsp;</div>

                <!-- Login-details -->

                <div id="login-details">

                    <p>Welcome, <a href="#" id="user">Guest</a> .</p>
                    <p><a href="http://chenlikpharmacy.freeserver.me/cart.php" class="cart" ><img src="css/images/cart-icon.png" alt="" /></a>Shopping Cart <a href="http://chenlikpharmacy.freeserver.me/cart.php" class="sum"> Cart Total</a></p>

                </div>

                <!-- End Login-details -->

            </div>
            <!-- End Header -->


            <!-- Main -->

            <div id="main" class="shell">


                <!-- Products -->
                <div id="main" class="products">            
                    <table width="100%" border="1" cellspacing="0" cellpadding="6">
                        <tr>
                            <td width="18%" bgcolor="#C5DFFA"><strong>Product</strong></td>
                            <td width="45%" bgcolor="#C5DFFA"><strong>Product Description</strong></td>
                            <td width="10%" bgcolor="#C5DFFA"><strong>Unit Price</strong></td>
                            <td width="9%" bgcolor="#C5DFFA"><strong>Quantity</strong></td>
                            <td width="9%" bgcolor="#C5DFFA"><strong>Total</strong></td>
                            <td width="9%" bgcolor="#C5DFFA"><strong>Remove</strong></td>
                        </tr>
    <?php echo $cartOutput; ?><br/>

        <!-- <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr> -->
                    </table>
    <?php echo $cartTotal; ?>
                    <br />
                    <br />
    <?php echo $pp_checkout_btn; ?>
                    <br />
                    <br />
                    <a href="cart.php?cmd=emptycart">Click Here to Empty Your Shopping Cart</a>

                    <!-- End Products -->


                    <div class="cl">&nbsp;</div>

                </div>



                <div class="cl">&nbsp;</div>

            </div>

            <!-- End Main -->

            <!-- Footer -->

            <div id="footer" class="shell">

                <div class="top">

                    <div class="cnt">

                        <div class="col about">

                            <h4>About Chenlik Pharmacy Sdn. Bhd.</h4>

    <?php echo $custom1; ?>

                        </div>

                        <div class="col store">

                            <h4>Store</h4>

    <?php echo $footer; ?>

                        </div>

                        <div class="col" id="newsletter">

                            <h4>Newsletter</h4>

                            <p>This function is not activate yet. </p>

                            <form action="" method="post">

                                <input type="text" class="field" value="Your Name" title="Your Name" />

                                <input type="text" class="field" value="Email" title="Email" />

                                <div class="form-buttons"><input type="submit" value="Submit" class="submit-btn" />
                                </div>

                            </form>

                        </div>

                        <div class="cl">&nbsp;</div>

                        <div class="copy">

                            <p>&copy;2013 <a href="http://chenlikpharmacy.freeserver.me">Chenlik Pharmacy Sdn. Bhd.</a>&nbspDesign by <a href="http://css-free-templates.com/">CSS-FREE-TEMPLATES.COM</a> &nbsp.Source code credit to: <a href="http://www.developphp.com">Adam Khoury</a>. Modified & Complied by: Philip Tiong</p>
                        </div>
                    </div>
                </div>
            </div>
            <!-- End Footer -->
        </body>
    </html>

要显示错误,您需要将其添加到要显示错误的 html 中:

<?php
if (!empty($err)) :
foreach ($err as $error) :
echo $error; 
endforeach;
endif;
于 2013-07-31T19:42:10.107 回答
0

php 可用于服务器端验证,即在您提交表单之后。如果要在填写表单期间验证条目,则需要使用 jquery。我提到了这两种方式的一个例子。

<script> 
$(document).ready(function(){
$( "#registerationform" ).validate({
    rules: {
           fname:"required",
           lname:"required",
           age: {required: true,
                number: true,
                digits: true,

           },
           email:{ required:true,
                    email: true
           },
           pword:{required: true,
                    minlength: 5
           },
           uname: {required : true
           }

        },
   messages: {
        fname:"Please, enter your First name",
        lname:"Please, enter your Last name",
        age:{required :"Please, Enter your age",
             number: "Only numerals"
        },
        email: {required :"Please, Enter your Email ID",
                email :"Please, Enetr a valid Email ID"
        },
        pword:{required:"Please, Enter your password",
                minlength:"Minimum 5 character required"
        },
        uname:"Please, Enter your UserName"


        }

    });
});
</script>


<form name="registerationform" id="registerationform" method="post" autocomplete="off">
    <input type="hidden" name="action" value="signup">
    <div class="editProfileCont">
            <div class="formFieldRow">
             <div class="fields">

    First Name<sup><font color="#FF0000">*</sup></font>: <input type="text" name="fname"  maxlength="30" id="fname" class="required" minlength="1" value="<?php if(isset($_POST[fname])){ echo $_POST[fname];}?>"></div></div><br><br>
     <div class="formFieldRow">
         <div class="fields">
    Last Name<sup><font color="#FF0000">*</sup></font>: <input type="text" name="lname"  maxlength="30" id="lname" class="required" minlength="1" value="<?php if(isset($_POST[lname])){ echo $_POST[lname];}?>"></div></div> <br><br>
     <div class="formFieldRow">
         <div class="fields">
    Age<sup><font color="#FF0000">*</sup></font>:       <input type="text" name="age" maxlength="2" id="age" class="required" minlength="1" value="<?php if(isset($_POST[age])){ echo $_POST[age];}?>"></div></div><br>
    <b><?php echo $errorEmail?><br></b>
     <div class="formFieldRow">
         <div class="fields">
    E-Mail Id<sup><font color="#FF0000">*</sup></font>: <input type="text" name="email" maxlength="40" id="email" class="required email" minlength="1" value="<?php if(isset($_POST[email])){ echo $_POST[email];}?>"></div></div><br>
    <b><?php echo $errorUname?><br></b>
    <div id="disp"></div>
     <div class="formFieldRow">
         <div class="fields">
    User Name<sup><font color="#FF0000">*</sup></font>: <input type="text" name="uname"  maxlength="10" id="uname" class="required" minlength="1" value="<?php if(isset($_POST[uname])){ echo $_POST[uname];}?>"></div></div> <br><br>
     <div class="formFieldRow">
         <div class="fields">
    Password<sup><font color="#FF0000">*</sup></font>:  <input type="password" name="pword" id="pword" class="required" minlength="5"></div></div><br><br><br>

  




这是 jquery 验证,与您的表单在同一页面上。在表单的操作页面上执行 php 验证,这非常简单。

<?php
if(isset($_post['uname'])){
$uname = $_post['uname'];
$sql="INSERT INTO persons ( UserName )Values('$_POST[uname]')";
}else echo "please enter username/empty fields not allowed";
?>
于 2013-07-31T09:07:21.377 回答