Re: anyone can help?
| From: | Henry | Date: | Fri, 09 Aug 2002 07:53:19 +0000 |
| Subject: | Re: anyone can help? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111780@lists.php.net to get a copy of this message | ||
I'm not sure about which bits do not work but one that I've spotted is the
extra ";"! A common and frustrating bug, see below:
> IF (!$accion); {
should be
IF (!$accion) {
The ";" means that if not $accion then do "nothing". The brace after then
only starts a scope which is always executed.
Henry
"::: Flavio Bastos Amiel::::::>" <flavinho@cantv.net> wrote in message
news:20020809063339.88657.qmail@pb1.pair.com...
> this is not functional and i dont know why, this is stoping where if
> (!$accion) is, and the wuery if you run in into the sql is
> perfectREQUIRE('conexion.php');
>
> $accion=mysql_query("SELECT * FROM empresas");
>
> IF (!$accion); {
>
> echo "<div alig=\"center\">no se puede ver la
> solicitud</div>";
>
> }
>
> ?>
>
>
> <form name="form1" method="post" action="">
> <select name="select"></select>
> <?
> IF ($accion) {
> WHILE ($r = mysql_fetch_array($accion)){
> extract($r);
> $empresas = nl2br($empresas);
>
> echo "<select name=\"$empresas\">$empresas</select>"; } }
> ?>
> </form>
>
>
>