PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
jaross15
Forum Newbie
Posts: 2 Joined: Thu Jun 16, 2005 3:37 pm
Post
by jaross15 » Thu Jun 16, 2005 3:42 pm
Code: Select all
<!-- Promotional Code -->
<font face="e;tahoma,arial"e; size="e;2"e;>
<table width="e;300"e; border="e;0"e; cellspacing="e;0"e; cellpadding="e;0"e;>
<tr><td colspan="e;2"e; bgcolor="e;D98719"e;>
<table width="e;100%"e; cellpading="e;0"e;>
<tr><td><b><font face="e;tahoma,arial"e; size="e;4"e; style="e;color:CDC9C9"e;><font size="e;5"e;>0</font> Promotional Code</font></b></td></tr>
<tr><td colspan="e;2"e; align="e;right"e; bgcolor="e;FAE2E6"e;>
<table cellspacing=0 cellpadding=0><tr><td>
<input type="e;text"e; size="e;40"e; name="e;pro"e; value="e;<?php echo $pro;?>"e;></td>
<?php
$dis = "e;.10"e;;
if($pro==="e;LTWOU"e;) {$pro = $dis"e;;}
?>
I'm having trouble with the above script. I want it so that if the user enters LTWOU that It will give the user 10% discount. This script is part of my shopping cart so when i try to view my shopping cart its just a while screen.
Can anyone help?
hawleyjr
BeerMod
Posts: 2170 Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA
Post
by hawleyjr » Thu Jun 16, 2005 3:57 pm
Code: Select all
<?php
$dis = ".10";
if($pro==="LTWOU") {$pro = $dis";}
?>
Remove the " on the $pro = $dis;
Code: Select all
<?php
$dis = ".10";
if($pro==="LTWOU") {$pro = $dis;}
?>
jaross15
Forum Newbie
Posts: 2 Joined: Thu Jun 16, 2005 3:37 pm
Post
by jaross15 » Thu Jun 16, 2005 4:14 pm
Thanks, Cant beleive I missed that!