Hi!

Oh, sorry. I seem to have some things ...

Try setting a variable to show PHP-errors (seems like PHP doesn't show errors 
on your server)


Try this code instead:

<?php
error_reporting(E_ALL);
echo "rank=" . $rank;
echo "unregistered=" . Unregistered;

if ($rank !== Unregistered) {

echo "true";

}

else {

echo "false";

}

?>

You must get some kind of return-value / errors / notices... 


Best regards
/Gustav Wiberg
 

-----Original Message-----
From: Stephen Deacon [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 07, 2007 6:12 PM
To: Gustav Wiberg
Subject: Re: [PHP-WIN] Help with if

I did try doing

echo "rank=" . $rank;
echo "unregistered=" . Unregistered;

if ($rank) !== Unregistered) {

echo "true";

else {

echo "false";

}

but it showed nothing, neither true or false showed up. What could I be 
doing wrong then?
----- Original Message ----- 
From: "Gustav Wiberg" <[EMAIL PROTECTED]>
To: "'Stephen'" <[EMAIL PROTECTED]>; <php-windows@lists.php.net>
Sent: Tuesday, August 07, 2007 1:07 AM
Subject: RE: [PHP-WIN] Help with if


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:[EMAIL PROTECTED]
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




No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 2007-08-06 16:53
 

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

Reply via email to