Table of Contents
BARCODE扫描??成品统计(箱号、储位维护)
回复讨论(解决方案)
Home Backend Development PHP Tutorial submit提交的问题

submit提交的问题

Jun 23, 2016 pm 01:55 PM
submit 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>
Copy after login

问题点是:输入非数字,输出为0,中文和字符无法正常显示。


回复讨论(解决方案)

intval变量转成整数类型。所以只能输出数字,其余类型自动转换为int

对呀,你就是这样设计的!
$Storage =  intval( $_GET['Storage'] );
把传入的数据转换为整数

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MySQL transaction processing: the difference between automatic submission and manual submission MySQL transaction processing: the difference between automatic submission and manual submission Mar 16, 2024 am 11:33 AM

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 Tips for implementing form validation and submission with PHP and UniApp Jul 06, 2023 am 10:57 AM

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

Getting Started with Java Git: Exploring Version Control from Scratch Getting Started with Java Git: Exploring Version Control from Scratch Feb 23, 2024 am 10:25 AM

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 submission in Vue How to handle complex form submission in Vue Oct 15, 2023 pm 03:42 PM

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 How to handle form data verification and submission in Vue technology development Oct 09, 2023 am 08:12 AM

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

How to use v-on:submit to listen to form submission events in Vue How to use v-on:submit to listen to form submission events in Vue Jun 11, 2023 am 10:48 AM

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,

How to Submit a Time Off on DingTalk_Introduction to How to Submit a Time Off on DingTalk How to Submit a Time Off on DingTalk_Introduction to How to Submit a Time Off on DingTalk Mar 29, 2024 pm 03:16 PM

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 Practical PHP anti-shake technology: avoid repeated submission of data Oct 12, 2023 pm 12:03 PM

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,

See all articles