IF Statement not working.
Posted: Wed Jun 23, 2010 4:10 am
I have a page which I want to pull an option from.
The page needs to have a personalised message on it, and for those pages not needing the personalised message I want the variable to display 'N/A'
The code is really long but I have this displaying on 1 page out of 6.
This works great I only get that on the one page I need it on, then once the form is submitted the following code runs:
The problem I'm having is with the IF statement if ($_REQUEST['cid']=='49') - I'm always getting N/A rather than the custom message on this page.... On the other pages this is fine because its what I want! Any help would be appriciated!
Ara
The page needs to have a personalised message on it, and for those pages not needing the personalised message I want the variable to display 'N/A'
The code is really long but I have this displaying on 1 page out of 6.
Code: Select all
<?php if ($_REQUEST['cid']=='49') {
?>
<tr>
<td valign="middle" height="30" style="color:#7F7F7F; font-size:12px;">
<span style="color:#C47BBD;"> Personalised Message:</span>
<input type="text" name="msg" value="" style="width:175px; height:16px; border:1px solid #C47BBD; color:#C47BBD; font-weight:bold;" maxlength="50"/>
</td>
<?php
}
?>Code: Select all
if(isset($_REQUEST['btnSubmit'])){
// Begin Transaction .//
$price = $_REQUEST['price'];
$bool=false;
$class->begin();
$session_id=session_id();
$cartDate=date("Y-m-d");
//$totalPrice=$_REQUEST['txtTPrice'];
$qty=$_REQUEST['qty'];
$prID= $_REQUEST['prID'];
$price= $_REQUEST['price'];
$totalQty=$_REQUEST['qty'];
if ($_REQUEST['cid']=='49') {
$PerMes=$_REQUEST['msg'];
}
else {
$PerMes = 'N/A';
}
$mID=$_REQUEST['mID'];
$price= $_REQUEST['price'];Ara