[PHP-DB] Re: dynamic radio buttons.. checked or not?

2003-07-24 Thread Stf
Hi,

perhaps it is a stupid question, but have you put a space caractere before
checked ?
Did you type :
if ($thread[avail] == 0) echo " checked"; //is this record not available?
or
if ($thread[avail] == 0) echo "checked"; //is this record not available?

Other question :
Is avail a constant ?
If not, but it between quotes.

Stf




"Aaron Wolski" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Hi Guys.. hopefully someone can help with this.
>
> Code:
>
> $query = "select t.id, t.thread_index, t.pattern_index,
> t.avail, p.id, p.type, p.colour, p.colourID, p.manufacturer FROM
> kcs_patternthreads t LEFT JOIN kcs_threads p ON t.thread_index = p.id
> WHERE t.pattern_index = $id";
>
> $thread_manufacturer = '';
>
> $result = db_query($query);
> while($thread = db_fetch($result)) {
>
> if($thread_manufacturer !=
> $thread['manufacturer']) {
>
> echo " valign=\"top\">\n";
> echo "   colspan=\"2\">Threads:  class=\"adminSelectBox\">{$thread['manufacturer']}\n";
> echo "\n";
> $thread_manufacturer =
> $thread['manufacturer'];
>
> }
>
> $thread_colourID =
> str_pad($thread['colourID'], 8, " ", STR_PAD_RIGHT);
> $thread_type = str_pad($thread['type'],
> 20, " ", STR_PAD_RIGHT);
> $thread_colour =
> str_pad($thread['colour'], 20, " ", STR_PAD_RIGHT);
>
> $thread_colourID = str_replace("
> "," ", $thread_colourID);
> $thread_type = str_replace(" "," ",
> $thread_type);
> $thread_colour = str_replace("
> "," ", $thread_colour);
>
> echo "\n";
>
> echo "   colspan=\"2\" style=\"font-family:monospace;color: #696565;font-size:
> 9pt;\">{$thread_colourID}{$thread_type}{$thread_colour}Available to
> Order:  Yes
> if ($thread[avail] == 1) echo "
> checked"; //is this record available?
>
> echo
> ">   No
> if ($thread[avail] == 0) echo "
> checked"; //is this record not available?
>
> echo ">\n";
>
> echo"\n";
> }
>
> END CODE
>
> Everything on this script works except the radio button "checked" part.
>
> What's supposed to happen is if $thread[avail] == 1 then display the YES
> radio as "checked" for that record and if $thread[avail] == 0 then
> display the NO radio as checked for that record.
>
> I did an echo on $thread[avail] and I get the correct values:
>
> 0
> 1
> 0
>
>
> Does anyone have a clue as to my problem here?
>
> Thanks in advance!
>
> Aaron
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] PHP & oci : undefined function ocilogon

2003-07-22 Thread Stf
Hi,

I just installed apache 1.3.12, php 4.2.3 and oracle 8.1.7 on Linux RedHat
7.3
Apache and PHP work fine, oracle works fine.
I copied oci.h from $ORACLE_HOME/rdbms/demo/ to ./php/ext/oci8/
I have configure php to supporte oci8 functions :
configure --with_oracle=$ORACLE_HOME --with_oci8=$ORACLE_HOME -with-apache..
..
No error !
But when I want to use ocilogon function I have this message :
Fatal error: Call to undefined function: ocilogon()

Have somebody had this sort of problem ?
How can I solve it ?

Stf



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php