Re: HTML button display problem
| From: | David Robley | Date: | Tue, 23 Jul 2002 04:37:19 +0000 |
| Subject: | Re: HTML button display problem | ||
| References: | 1 2 3 4 5 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20724@lists.php.net to get a copy of this message | ||
In article <20020723034151.62776.qmail@pb1.pair.com>, markbm@hotmail.com
says...
> Thanks for the reply. When I added:
>
> <tr>
> <td colspan=3 ><center>
>
>
> <?php printf($result[PAYPAL_BUTTON]);
> echo mysql_errno() . ": " . mysql_error() . "\n";?>
> </center>
> </td>
> </tr>
>
> </td> </center>
> </tr>
>
> It returned the value 0:, which to me is saying that its not pulling back
> the data, but I'm not sure why. The data in the PAYPAL_BUTTON field is:
>
> <FORM method="POST" >
> <P><INPUT type="submit" value="Submit" name="subBut">
> </FORM>
>
> I will paste the entirety of my code for your reference. I'm stumped.
> Thanks again.
>
> Mark
<?php printf($result[PAYPAL_BUTTON]);
Should this not be
<?php printf(mysql_result($result, 0, 'PAYPAL_BUTTON');
consistent with all your other code?
May I recommend to you the use of mysql_fetch_array() and extract(), to
make life a little easier?
mysql_errno = 0 means no error in the last mysql query, and is best used
immediately after the call to mysql; note however that I suggested
mysql_error, which will return a string containing any error message
returned by mysql. Again, use it immediately after your call to the
database.
--
David Robley
Temporary Kiwi!
Quod subigo farinam