Page 1 of 1

promotion scrip

Posted: Thu Jun 16, 2005 3:42 pm
by jaross15

Code: Select all

<!-- Promotional Code -->
<font face=&quote;tahoma,arial&quote; size=&quote;2&quote;>
<table width=&quote;300&quote; border=&quote;0&quote; cellspacing=&quote;0&quote; cellpadding=&quote;0&quote;>
<tr><td colspan=&quote;2&quote; bgcolor=&quote;D98719&quote;>
    <table width=&quote;100%&quote; cellpading=&quote;0&quote;>
    <tr><td><b><font face=&quote;tahoma,arial&quote; size=&quote;4&quote; style=&quote;color:CDC9C9&quote;><font size=&quote;5&quote;>0</font> Promotional Code</font></b></td></tr>
    <tr><td colspan=&quote;2&quote; align=&quote;right&quote; bgcolor=&quote;FAE2E6&quote;>
    <table cellspacing=0 cellpadding=0><tr><td>
    <input type=&quote;text&quote; size=&quote;40&quote; name=&quote;pro&quote; value=&quote;<?php echo $pro;?>&quote;></td>

<?php
$dis = &quote;.10&quote;;
if($pro===&quote;LTWOU&quote;) {$pro = $dis&quote;;}
?>
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?

Posted: Thu Jun 16, 2005 3:57 pm
by hawleyjr

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;}
?>

Posted: Thu Jun 16, 2005 4:14 pm
by jaross15
Thanks, Cant beleive I missed that!