Images seem to be ignoring php code
Posted: Thu Mar 18, 2010 5:34 am
Hi, I'm completely new to php and i'm doing some modifications to a script. Most of it i managed to get working to trial and error + reading up, except for this 1 problem
I've got 2 images, 1 is supposed to present at all times, and the 2nd one is only to appear when the user meets a certain criteria.
For some reason, if the users have less then the minimum points i've set the one that is supposed to be present at all times doesn't appear. Both appear only when the user has met the criteria for the number of points. To my knowledge i can't understand what's wrong. Hoping you guys could help out and thank you in advance for taking the time to help.
ps: I think i did it correctly, but its supposed to be (earn_points.jpg) appearing at all times regardless of the number of points a user has and (claim_voucher) only appearing after achieving the minimum number of points.
I've got 2 images, 1 is supposed to present at all times, and the 2nd one is only to appear when the user meets a certain criteria.
For some reason, if the users have less then the minimum points i've set the one that is supposed to be present at all times doesn't appear. Both appear only when the user has met the criteria for the number of points. To my knowledge i can't understand what's wrong. Hoping you guys could help out and thank you in advance for taking the time to help.
Code: Select all
<div class="about_txt"> <span style="float:right;"><a href="#" onclick="startGateway('Mjc4Njg%3D');"><img src="images/earn_points.jpg" width="195" height="100" border="0" /></a><br />
<?php if ($pointsneeded <= 0){?>
<a href="request.php"><img src="images/claim_voucher.jpg" width="195" height="100" border="0" /></a>
<?php } ?>