RE: [PHP-WIN] Help with if
| From: | Gustav Wiberg | Date: | Tue, 07 Aug 2007 06:07:00 +0000 |
| Subject: | RE: [PHP-WIN] Help with if | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-28339@lists.php.net to get a copy of this message | ||
Hi!
I saw a several things that other people has pointed out, but there is another thing...
You are missing '; after height="1"
echo '<form action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
but24.gif" border="0" name="submit" alt="Make payments with PayPal -
it's fast, free and secure!">
<img alt="" border="0"
src="https://www.paypal.com/en_US/i/scr/pixel.gif"
width="1"
height="1">
The if-statement is missing a parenthese )
if ($rank) !== Unregistered) {
You have two right paranthesis and one left...
if ($rank) !== Unregistered) {
Could be
if ($rank !== Unregistered) {
OR
if (($rank) !== Unregistered) {
Or as someone else has pointed out:
if ($rank !== $Unregistered) {
</php should be <?php as someone has pointed out also
You can try to do this and see what happens. (and figure out what's the problem)
echo "rank=" . $rank;
echo "unregistered=" . Unregistered;
if ($rank) !== Unregistered) {
echo "true";
else {
echo "false";
}
Best regards
/Gustav Wiberg
-----Original Message-----
From: Stephen [mailto:therealzerocool@gmail.com]
Sent: Monday, August 06, 2007 5:18 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Help with if
i'm tryin to get the if command to work on my site so that I can get the
buttons to show for registering if a certain user is at the first rank.
The current code that I have is as follows;
</php
if ($rank) !== Unregistered) {
echo '<form action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
but24.gif" border="0" name="submit" alt="Make payments with PayPal -
it's fast, free and secure!">
<img alt="" border="0"
src="https://www.paypal.com/en_US/i/scr/pixel.gif"
width="1"
height="1">
<rest of the code>
} else {
echo '<A HREF="https://www.paypal.com/cgi-bin/webscr?
cmd=_subscr-find&alias=therealzerocool%40gmail%2ecom">
<IMG SRC="https://www.paypal.com/en_US/i/btn/cancel_subscribe_gen.gif"
BORDER="0">
</A>';
}
?>
On the account i'm testing with it should not be showing both buttons on the
lase one, but both of them show. What am I doing wrong?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 2007-08-05 16:16