View Single Post
Old 12-10-2012, 07:47 PM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Quote:
Originally Posted by sunfighter View Post
Your very first line of code should be throwing up an error:
Ummm...I don't use PHP, but I know that is not true.

His very first line of code is actually 4 physical lines:
Code:
echo "<th><select name='A' id='A' onChange='" . theAFunction() . "'> 
<option value='1'>1</option> 
<option value='2'>2</option> 
</select></th>";
See the semicolon at the end there? It's correct.

***************

Quote:
WHERE aye LIKE '%' ... makes no sense.
Yes, it does. He is simply *testing* the logic. As he stated
Quote:
The default display is all of the records ...
and
Quote:
$a = '%'; // Setting the variables to match all the records first
And that WHERE clause (and the subsequent parts of it) will do exactly that.

****************

His problem is simple, he calls theAfunction( ) in doing that first echo, which I assume does what it is supposed to do by setting the value of $a to match $_POST["A"], but then he turns around *AFTER THAT* and *RESETS* $a back to $.

I *think* he just needs to put the initialization of $a, $b, etc. *BEFORE* that first call to theAfunction().

But maybe not. I don't follow the logic (or illogic) of this page, at all.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
sunfighter (12-11-2012)