国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Backend Development PHP Tutorial Get the name value passed by the image button in php_PHP tutorial

Get the name value passed by the image button in php_PHP tutorial

Jul 21, 2016 pm 04:06 PM
image name php web transfer but use value picture exist I button of beautify need

I need to use image buttons to beautify my web, but using the connection transfer method will cause variable values ??to appear in the browser bar, which looks uncomfortable. If I use hidden to submit, I don’t think it is necessary, because since the image has the name attribute , it should be able to be obtained, why do we need to add an extra variable? I posted it on bbs for several days and no one answered, so I had to read books and find a solution, and then I found it!

If the image in the form is used as submit, two related variables will be generated, for example:

Then, During the submission process, two variables will be generated, aaa_x and aaa_y
which contains the specific position x and y of the image on the screen
Then in php, just judge aaa_x and aaa_y

No need for any hidden fields, javascript, and connection value passing behavior!

The test passed. Everyone is welcome to test. If you have any questions, please contact me!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/315267.htmlTechArticleI need to use picture buttons to beautify my web, but using the connection delivery method will cause variables to appear in the browser bar Value, this looks uncomfortable. What if you use hidden to submit, and...
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

Undress AI Tool

Undress AI Tool

Undress images for free

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.

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)

PHP Installation on Linux PHP Installation on Linux Jul 18, 2025 am 04:30 AM

There are two main ways to install PHP on Linux: use package manager to install and source code to compile and install. For newbies or users who do not have special requirements for the version, it is recommended to use a package manager to install it. For example, running sudoaptupdate and sudoaptinstallphp on Ubuntu/Debian. On CentOS, you can first install the EPEL source and then install it with yum. After the installation is completed, you can verify through php-v and install common extensions. If you need a specific version or custom function, you should choose source code compilation and installation. The specific steps include downloading the source code package, decompression, and configuration (such as ./configure--prefix=/usr/local/php--with-co

PHP Multiline Comments: A Quick Guide PHP Multiline Comments: A Quick Guide Jul 18, 2025 am 04:34 AM

Yes,PHPsupportsmultilinecommentsusingthe/.../syntax.Towritethem,enclosetextbetween/and/,whichcanspanmultiplelinesandisignoredbytheinterpreter.Theyareidealforlongexplanations,disablingcodeblocksduringtesting,oraddingfileheaders.Avoidnestingthem,asitbr

Documenting PHP with Comments Documenting PHP with Comments Jul 18, 2025 am 04:34 AM

When writing PHP comments, you should clarify the purpose, logic and structure. 1. Each function and class uses DocBlock format to explain the role, parameters and return values; 2. Explain "why" in the key logic rather than just "what was done"; 3. Add a brief description at the top of the file, including functions, dependencies and usage scenarios; 4. Avoid nonsense comments, add only necessary instructions before complex logic, and do not record the modification history. This improves code readability and maintenance efficiency.

Hello, PHP! Hello, PHP! Jul 18, 2025 am 04:35 AM

Of course it is useful. PHP still plays an important role in web development, especially for CMS and e-commerce platforms. 1. The threshold for PHP is low, the syntax is intuitive, and suitable for beginners to get started; 2. It is widely used in dynamic web development, such as user login, form submission and other functions; 3. It can build an API interface, which is more efficient with the Laravel framework; 4. It supports CMS customization, such as WordPress plug-in and theme development; 5. It can write automated task scripts, such as data crawling and report generation; 6. Learning suggestions include mastering basic syntax, combining database exercise projects, using mainstream frameworks, focusing on security defense and referring to open source projects. PHP is highly practical and has a mature ecological environment, and is still widely used in small and medium-sized projects.

Mastering PHP Block Comments Mastering PHP Block Comments Jul 18, 2025 am 04:35 AM

PHPblockcommentsareusefulforwritingmulti-lineexplanations,temporarilydisablingcode,andgeneratingdocumentation.Theyshouldnotbenestedorleftunclosed.BlockcommentshelpindocumentingfunctionswithPHPDoc,whichtoolslikePhpStormuseforauto-completionanderrorche

PHP Data Types Explained PHP Data Types Explained Jul 18, 2025 am 04:36 AM

PHP has 8 main data types, which are divided into scalar types (boolean, integer, float, string), compound types (array, object) and special types (resource, null); where null means that the variable has no value. PHP is a weak-type language, and variables will automatically convert types. For example, adding 10 to a string "123" will turn into an integer 133, but strings that do not start with numbers will turn into 0, which can easily cause errors. It is recommended to manually determine or convert the type when processing input or interface data. Check the type of functions such as is_bool(), is_int(), etc.; casting can be used for (type) or settype() functions.

Setting Up a PHP Environment Setting Up a PHP Environment Jul 18, 2025 am 04:36 AM

Install the PHP interpreter and use package management tools such as Ubuntu's apt or macOS Homebrew installation; 2. Use web servers such as Apache or Nginx, Apache automatically loads PHP modules, and Nginx needs to be matched with PHP-FPM; 3. Install database support such as MySQL and other extensions and enables it; 4. Use modern editors such as VSCode, PhpStorm and debugging tools Xdebug to improve development efficiency.

What Not to Comment in PHP What Not to Comment in PHP Jul 18, 2025 am 04:37 AM

Annotations should be avoided in PHP development: 1. Do not comment sensitive information, such as database passwords or API keys, because these will still be exposed. It is recommended to use environment variables and add .gitignore; 2. Avoid outdated or incorrect comments. When modifying the code, you need to update the comments simultaneously to ensure the description is accurate; 3. Do not write meaningless comments. If you add redundant instructions to simple assignment statements, comments should be added in complex logic; 4. Do not replace PHPDoc document comments with ordinary comments. It is recommended to use standard formats to support IDE prompts and maintain structured information.

See all articles