I am trying to get this query to show the appropriate ticked vehicle roof height, unless no boxs are ticked then I want it to display all vehicle roof heights. However it doesn't work correctly, for example if i tick the Standard roof Height checkbox then submit the form and echo the $RoofHeight to the page I get:
Code: N/A', 'Standard Roof', 'Medium Roof', 'High Roof
The same goes if I check the medium or high roof buttons.
If I tick the N/A button then it just returns "N/A", so why does it work for 1 tickbox but not the others?
Here is my PHP code;
Code: //display all roof height vehicles when submit button isnt pressed
if (!isset($_POST['N/ARoofHeight']) && (!$_POST['Standard Roof']) && (!$_POST['Medium Roof']) && (!$_POST['High Roof'])) {
$RoofHeight = "N/A', 'Standard Roof', 'Medium Roof', 'High Roof";
}
//N/A Roof Height Only
if (isset($_POST['Submit']) && isset($_POST['N/ARoofHeight'])) {
$RoofHeight = $RoofHeight."N/A";
}
//Standard Roof Only
if (isset($_POST['Submit']) && isset($_POST['Standard Roof'])) {
$RoofHeight = $RoofHeight."Standard Roof";
}
//Medium Roof Only
if (isset($_POST['Submit']) && isset($_POST['Medium Roof'])) {
// add comma if necessary to separate
if (!empty($RoofHeight))
{
$RoofHeight = $RoofHeight."', '";
}
$RoofHeight = $RoofHeight."Medium Roof";
}
//High Roof ONLY
if (isset($_POST['Submit']) && isset($_POST['HighRoof'])) {
// add comma if necessary to separate
if (!empty($RoofHeight))
{
$RoofHeight = $RoofHeight."', '";
}
$RoofHeight = $RoofHeight."HighRoof";
}
Can anyone see whats wrong with it?
Thanks in advance
Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and string function don't seem to work because they consider the Greek alphabet letters as part of the A-Z
onclick problem
I have <input type="text" name="message"><a href=page2.php>click here</a> Can i parse the value whatever written in the textbox on url
Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database assigns an ID number. The front end displays each upload by ID number. I'm trying to set up the back
listcube issue
Hi
Locking mysql tables with php
HiBACKGROUND: I have multiple instances of the same php script running in a WAMP environment. The script contains mysql queries to lock certain tables in the database. I'm getting some very odd
problems with search form numerical "between" sending by php
I am trying to display the results of a search, on a sql database, on a web page. I set up html "select form" and set value to "Between x and x" I get a resource error when
cURL error
So here is my code... I got it off of here... http://www.youtube.com/watch?v=XcgQUsorF_8Because I'm completely new to cURL, just wanna get a page that requires a login... I wrote everything word for
MySQL Does not UPDATE- SQLString Problem
vb Syntax (Toggle Plain Text)
check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it to be posted.this is my current php, any help would be very much appreciated! thanks.Code:
need help with mail()
hi i want to send an email with attaching pdf file using php. i have the following script but the problem with this is when i send an attachment it does to the specified address but that email is