0

I have a form which for debugging I'm submitting as 'get' so that I can see the values of the inputs being passed.

the url pass is

AddMValidate.php?prodno=1682&isnew=on&special=on&title=Special&Mselect=SAM&FCKeditor1=dkja+sdfjasfd+adj+ashfkjdhaskj+fdh&submit=Submit

In my AddValidate.php page I have the following

#Validate that Machine Type has been selected
 
$Mselect = $_REQUEST["Mselect"];
 
if ($Mselect =="SAM")
 $Mesg .= "<li>You must select a <b>Machine Type</b>.</li>";

As you can see Mselect in the URL does = "SAM" but the validation statement above fails WHY?:sad:

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by MCP
0

I have a form which for debugging I'm submitting as 'get' so that I can see the values of the inputs being passed.

the url pass is

AddMValidate.php?prodno=1682&isnew=on&special=on&title=Special&Mselect=SAM&FCKeditor1=dkja+sdfjasfd+adj+ashfkjdhaskj+fdh&submit=Submit

In my AddValidate.php page I have the following

#Validate that Machine Type has been selected
 
$Mselect = $_REQUEST["Mselect"];
 
if ($Mselect =="SAM")
 $Mesg .= "<li>You must select a <b>Machine Type</b>.</li>";

As you can see Mselect in the URL does = "SAM" but the validation statement above fails WHY?:sad:

Silly question, but do you want SAM to be the only valid response? As written above, SAM will always return the error message, and anything else (even if MSelect is not specified) will continue silently. Syntactically, your code appears fine

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.