Or something like this?
SELECT * FROM `Bible_trivia` WHERE answer=`answer`;
Then match the results to trivia_answer_1 in php to see if correct.
if($trivia_answer_1 == $results) {
... do this
}
or a switch
switch ($results) {
case $trivia_answer_1:
... do this
Heh,
Thanks Karthik. Not my post.. :)
But your solution looks dead on..
Here you go Ron. Try this one.
Best,
Karl
On Oct 13, 2011, at 2:42 AM, Karthik S wrote:
Try this,
select
CASE answer
when 1 then trivia_answer_1
when 2 then trivia_answer_2
when 3 then
Hey everyone,Have a weird issue that I can't seem to figure out...Using PHP to insert phone numbers into the site... I have the Area Code, Exchange, and then dynamically create the last 4 digits... Once it's inserted it's dropping the leading zero's... Here's some samples:Copied from
Its looking for an integer not a string for the number of characters.
I think..
Eg : number_pad($n, 4);
On Oct 13, 2011, at 9:53 PM, Jason Pruim wrote:
number_pad($n, 4);
Best,
Karl DeSaulniers
Design Drumm
http://designdrumm.com