php form表单相关有关问题
php form表单相关问题
php代码如下:
Price:
show_by_Price.php关键处理代码如下:
if ($_GET[categories]=='pleaseChoose'){
if ($_GET[price]=='Please_Choose'){
//$result_price=null;
echo Please_choose ;
}
else {
if ($_GET[price]=='hight'){
echo p_H ;
$result_price = mysql_query("SELECT * FROM Product where Price>2000");
}
elseif ($_GET[price]=='middle'){
echo p_M ;
$result_price = mysql_query("SELECT * FROM Product where Price1000");
}
else{
echo p_L ;
$result_price = mysql_query("SELECT * FROM Product where Price }
}
}
else
{
if ($_GET[price]=='Please_Choose'){
echo C_P ;
$result_price = mysql_query("SELECT * FROM Product where Category='$_GET[categories]'");
}
else{
if ($_GET[price]=='hight'){echo C_H;
$result_price = mysql_query("SELECT * FROM Product where Price>2000 and Category='$_GET[categories]'");
}
elseif ($_GET[price]=='middle'){echo C_M;
$result_price = mysql_query("SELECT * FROM Product where (Price1000 )and Category='$_GET[categories]'");
}
else{echo C_L;
$result_price = mysql_query("SELECT * FROM Product where Price }
}
}
为什么两个框都选择的是Please Choose的时候 ,执行的是echo p_L ;
$result_price = mysql_query("SELECT * FROM Product where Price而不是echo Please_choose ;
求高手指点
------解决方案--------------------
当一个表单提交时,另一个表单的值是未设置状态,而不是你想的等于pleaseChoose,所以,你的后台逻辑判断有误,你再好好看看。
------解决方案--------------------
都跟你说啦。放入一个form当中去,事情就好办多了。

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

AI Hentai Generator
Generate AI Hentai for free.

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



Many users will choose the Huawei brand when choosing smart watches. Among them, Huawei GT3pro and GT4 are very popular choices. Many users are curious about the difference between Huawei GT3pro and GT4. Let’s introduce the two to you. . What are the differences between Huawei GT3pro and GT4? 1. Appearance GT4: 46mm and 41mm, the material is glass mirror + stainless steel body + high-resolution fiber back shell. GT3pro: 46.6mm and 42.9mm, the material is sapphire glass + titanium body/ceramic body + ceramic back shell 2. Healthy GT4: Using the latest Huawei Truseen5.5+ algorithm, the results will be more accurate. GT3pro: Added ECG electrocardiogram and blood vessel and safety

Fujifilm fans were recently very excited at the prospect of the X-T50, since it presented a relaunch of the budget-oriented Fujifilm X-T30 II that had become quite popular in the sub-$1,000 APS-C category. Unfortunately, as the Fujifilm X-T50's launc

TheFiiOCP13cassetteplayerwasannouncedinJanuary.Now,FiiOisexpandingitsportfoliowithtwonewmodels-onewitharedfrontandonewithatransparentfront.Thelatternotonlyperfectlymatchestheretrocharmoftheangulardesign,butalso

The Klipsch Flexus Core 300 is the top model in the series and is positioned above the already available Flexus Core 200 in the company's soundbar line-up. According to Klipsch, this is the first soundbar in the world whose sound can be adapted to th

Why Snipping Tool Not Working on Windows 11 Understanding the root cause of the problem can help find the right solution. Here are the top reasons why the Snipping Tool might not be working properly: Focus Assistant is On: This prevents the Snipping Tool from opening. Corrupted application: If the snipping tool crashes on launch, it might be corrupted. Outdated graphics drivers: Incompatible drivers may interfere with the snipping tool. Interference from other applications: Other running applications may conflict with the Snipping Tool. Certificate has expired: An error during the upgrade process may cause this issu simple solution. These are suitable for most users and do not require any special technical knowledge. 1. Update Windows and Microsoft Store apps

WhiletheLightPhone2from2018wasstillequippedwithaneconomicale-inkdisplay,theLightPhone3usesanOLEDdisplaythatcanonlydisplaygrayscale.Thereasonfortheswitchtothe3.92-inchOLEDpanelwithitsresolutionof1,240x1,080isth

In Linux, option refers to a command option, which is a switch that adjusts the command execution behavior. That is, different options determine the display results of the command. Options are divided into long options and short options: 1. Short options are guided by "-". When there are multiple short options, spaces are used to separate each option; 2. Long options are complete words. , and usually cannot be combined.

Shortly after Tesla launched the Model 3 Highland refresh towards the end of last year, the US federal EV tax incentive rules changed, cutting the potential discount in half for eligible buyers because of Tesla's use of Chinese LFP cells in the new M
