954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Validating problems

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

[php]
#Validate that Machine Type has been selected

$Mselect = $_REQUEST["Mselect"];

if ($Mselect =="SAM")
$Mesg .= "You must select a Machine Type.";
[/php]

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

Mych
Newbie Poster
3 posts since Oct 2006
Reputation Points: 10
Solved Threads: 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 [php] #Validate that Machine Type has been selected $Mselect = $_REQUEST["Mselect"]; if ($Mselect =="SAM") $Mesg .= "You must select a Machine Type."; [/php] 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

MCP
Light Poster
44 posts since Oct 2006
Reputation Points: 14
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You