Home > Backend Development > PHP Tutorial > PHP cannot extract the value of submit after replacing the submit button with an image_PHP Tutorial

PHP cannot extract the value of submit after replacing the submit button with an image_PHP Tutorial

WBOY
Release: 2016-07-13 17:44:21
Original
833 people have browsed it

There are two questions here:

1. Image buttons are different from ordinary buttons and require js to simulate the submission operation.

2. When obtaining the button operation in php, the normal isset($_POST[object name]) cannot be used. After printing_r($_POST), it is found that:

Array ( [btn_reg_x] => 81 [btn_reg_y] => 27 )

After reviewing the information, it was found:

$_POST[thisname_x] --The X position of the picture when the mouse is clicked
$_POST[thisname_y] --The Y position of the picture when the mouse is clicked

Therefore, modify the original client submission code to:

php code changed to:

if(isset($_POST[btn_reg_x])) // or (isset($_POST[btn_reg_y]))
{
echo ok!Thats right.;
}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478758.htmlTechArticleThere are two problems here: 1. Image buttons are different from ordinary buttons and need to use js to simulate the submission operation. 2. When obtaining button operations in php, the normal isset($_POST[object name]) cannot be used...
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template