submit提交的问题
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style type="text/css"> //body { font-family:Verdana; font-size:12px; margin:0 auto;} //#container {margin: 0 auto; width:70%;} th { background-color:#0099CC;color:#FFFFFF;} tr { background-color:#F0F8FF;text-align:center;} td { background-color:#CCFFCC;} td.pack { background-color:#00FFFF;} </style> </head> <body BACKGROUND='https://mobile.yungtay.com.cn/image/bgp.gif'> <center><h2 id="BARCODE扫描-成品统计-箱号-储位维护">BARCODE扫描??成品统计(箱号、储位维护)</h2> <form name=query action='' method=get> <table style="width: 100%" class="style3"> <tr> <th>储位</th> </tr> <tr> <td><input type="text" size=70 name="Storage"> <input type="submit" value="新增/修改"> </td> </tr> </table> <hr> </form> <? if(isset($_GET['Storage'])){ $Storage = intval( $_GET['Storage'] ); } echo $Storage;?> </body></html>
问题点是:输入非数字,输出为0,中文和字符无法正常显示。
回复讨论(解决方案)
intval变量转成整数类型。所以只能输出数字,其余类型自动转换为int
对呀,你就是这样设计的!
$Storage = intval( $_GET['Storage'] );
把传入的数据转换为整数

Hot AI Tools

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

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

Undress AI Tool
Undress images for free

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

MySQL transaction processing: the difference between automatic submission and manual submission. In the MySQL database, a transaction is a set of SQL statements. Either all executions are successful or all executions fail, ensuring the consistency and integrity of the data. In MySQL, transactions can be divided into automatic submission and manual submission. The difference lies in the timing of transaction submission and the scope of control over the transaction. The following will introduce the difference between automatic submission and manual submission in detail, and give specific code examples to illustrate. 1. Automatically submit in MySQL, if it is not displayed

Tips for implementing form validation and submission with PHP and UniApp Introduction: When developing web pages or mobile applications, form validation and submission are essential functions. Form validation is used to check whether the data entered by the user conforms to specific rules, and submission saves or sends the data entered by the user to the server. This article will introduce the techniques of using PHP and UniApp to implement form validation and submission to help developers quickly implement front-end and back-end interaction functions. 1. PHP implements form validation. The following is a PHP form validation sample code for

Introduction to git Git is a distributed version control system, which means that each developer has a complete copy of the code base on their computer. This is different from a centralized version control system (such as Subversion or Perforce), which only has a central code repository. The benefit of distributed version control is that it makes collaboration more efficient because developers can work offline and synchronize with the central code base later. Installing Git To use Git, you need to install it on your computer first. You can download the installer for your operating system from the official Git website. After the installation is complete, you can enter git --version in the command line to check whether the installation was successful. Git basic concepts repository: Git

How to handle complex form submissions in Vue requires specific code examples. In Vue, to handle complex form submissions, you can use Vue's form processing methods and other related plug-ins or features to simplify the development process. This article will introduce how to use Vue and some other common plug-ins to handle complex form submissions, and provide specific code examples. 1. Two-way binding of form data One of the core features of Vue is the two-way binding of data. In form processing, we can use Vue instructions to achieve bidirectional communication between form data and views.

How to handle form data verification and submission in Vue technology development In Vue technology, processing form data verification and submission is a common and important task. In actual development, we often need to verify the form data entered by the user to ensure that it meets the specified format requirements and can be safely submitted to the back-end server. The following will introduce a common method of processing form data verification and submission, and provide specific code examples. Data verification in Vue, we can use the Vuelidate plug-in for form data

Vue is a popular JavaScript framework that helps developers build interactive front-end applications. Forms are very common interface elements in Vue applications. When the user enters data into the form and submits it, we may need to listen for the form submission event. This article will introduce how to use the v-on:submit directive in Vue to listen for form submission events. First, defining form elements in Vue requires using Vue's data binding syntax. Let's say we have a form,

1. Open DingTalk and click on the workbench. 2. Click Request Leave. 3. Click Adjust Time Off. 4. After setting the rest time, click Submit.

Practical PHP anti-shake technology: Avoid repeated submission of data In web development, we often encounter scenarios that require users to submit data. If the user clicks the submit button multiple times in a short period of time, the data may be submitted repeatedly, causing unnecessary trouble to the system and users. In order to solve this problem, we can use PHP anti-shake technology to avoid repeated submission of data. This article will give specific code examples to help readers implement PHP anti-shake technology. The principle of PHP anti-shake technology is that when the submit button is clicked,
