LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-09-2008, 02:53 PM   #1
CowanServices
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
PHP Error Parse error: parse error, unexpected $ in /home/content/S/k/i/SkinCare4U/h


I cannot figure out what is breaking in some PHP code. Can someone please help? I know there's a curly brace missing but I am not sure where to put the close.

Here is the code:

<?php

$psw = strtolower($_POST['psw']); // making it non case sensitive

if(isset($_POST['process'])) {
if($psw == 'wholesalequalified' || $psw == 'cofqualified' || $psw == 'cofuaqualified') {
session_register("mypassword");
} else {
header("location:index.php?page=order&error=1");
}
}

if(!session_is_registered(mypassword)){
// If not logged in show form to login
?>

<tr>
<td width="150" rowspan="6" align="left" valign="top" id="menu">
<?php require('templates/navigation.php');?>
</td>
<td width="1" rowspan="8" bgcolor="#005B2E">&nbsp;</td>
<td width="9" rowspan="8">&nbsp;</td>
<td>
<p align="center">
<img src="images/logo.png" width="447" height="162" /><br />
<br />
</p>
</td>
</tr>
<tr>
<td height="10"><HR align="center" width="95%" /></td>
</tr>
<tr>
<td align="center" valign="middle" id="margin">
<p class="style11">ORDER</p>
</td>
</tr>
<tr>
<td id="margin" align="left"><br />
<p align="center"><span class="style16">We sell to qualified retailers in the beauty and medical markets.</span></p>
<p align="center">To Order, enter your Password:</p>
</td>
</tr>
<form action="index.php?page=order" method="post" enctype="multipart/form-data" id="login" name="login">
<input type="hidden" name="process" id="process" value="yes" />
<tr>
<td align="center" valign="top" id="margin">
<?php if($_GET['error']) { ?>
<p align="center" style="color:#FF0000;">Incorrect Password</p>
<?php } ?>

<p align="center">
"For Authorized Accounts only"<br />
<input type="password" name="psw" id="psw" /><br />
<br />
<input type="submit" name="submit" id="submit" value="ENTER" />
</p>
</td>
</tr>
</form>
<td><tr>
<p align="center">Thank you for your interest in<br />
<span class="style16"><strong>Naturience...</strong> The Perfect Blend of Nature &amp; Science</span><br />
</p>
<p align="center">To inquire about or place an order, please call<br />
<span class="style16">1-888-331-6301 or email us at <a href="mailto:info@naturience.com">Info@Naturience.com</a></span></p>

<p align="center">&nbsp;</p>

<p align="center"><a href="index.php?page=order"></a></p>

<!-- hidden order link was here -->
<p align="center">CONTACT US</p>
<p align="center">Call 1-888-331-6301 or email info@naturience.com</p>
<p align="center"> Thank you for your interest....Naturience....the perfect blend...science.</p>
<p align="center"><br />
</p>
</td>
</tr>
 
Old 12-09-2008, 06:13 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Where you put the close brace depends on where you want the conditional block to end. The condition that is still open is:
Code:
if(!session_is_registered(mypassword)){
I hope someone sends this URL to info@naturience.com, in case they are paying for this work.
 
Old 12-09-2008, 08:26 PM   #3
CowanServices
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the help so far. I really appreciate it.

I hope someone sends this URL to info@naturience.com, in case they are paying for this work.[/QUOTE]

They are paying. I found what I thought was the solution, but am still having trouble and all of the curly braces are closing, but I still have the same error. Any other thoughts?

<?php

$psw = strtolower($_POST['psw']); // making it non case sensitive

if(isset($_POST['process'])) {
if($psw == 'wholesalequalified' || $psw == 'cofqualified' || $psw == 'cofuaqualified') {
session_register("mypassword");
} else {
header("location:index.php?page=order&error=1");
}
}

if(!session_is_registered(mypassword)){
// If not logged in show form to login
?>

<tr>
<td width="150" rowspan="6" align="left" valign="top" id="menu">
<?php require('templates/navigation.php');?>
</td>
<td width="1" rowspan="8" bgcolor="#005B2E">&nbsp;</td>
<td width="9" rowspan="8">&nbsp;</td>
<td>
<p align="center">
<img src="images/logo.png" width="447" height="162" /><br />
<br />
</p>
</td>
</tr>
<tr>
<td height="10"><HR align="center" width="95%" /></td>
</tr>
<tr>
<td align="center" valign="middle" id="margin">
<p class="style11">ORDER</p>
</td>
</tr>

<form action="index.php?page=order" method="post" enctype="multipart/form-data" id="login" name="login">
<input type="hidden" name="process" id="process" value="yes" />
<tr>
<td align="center" valign="top" id="margin">
<?php if($_GET['error']) { ?>
<p align="center" style="color:#FF0000;">Incorrect Password</p>
<?php } ?>

<p align="center">
"For Authorized Accounts only"<br />
<input type="password" name="psw" id="psw" /><br />
<br />
<input type="submit" name="submit" id="submit" value="ENTER" />
</p>
</td>
</tr>
</form>
<?
} else {
?>
<tr>
<td width="150" rowspan="10" align="left" valign="top" id="menu">
<?php require('templates/navigation.php');?>
</td>
<td width="1" rowspan="10" bgcolor="#005B2E">&nbsp;</td>
<td width="9" rowspan="10">&nbsp;</td>
<td><p align="center"><img src="images/logo.png" width="447" height="162" /><br />
<br />
</p>
</td>
</tr>
<tr>
<td height="10"><hr align="center" width="95%" /></td>
</tr>
<tr>
<td align="center" valign="top" id="margin">
<p class="style11">Wrinkle-Ease Kits</p>


<p class="style11">Wrinkle Ease Kit/Wrinkle Resist Kit Sizes Compared</p>


<p class="style11">Wrinkle-Resist Kits</p>

<br />
<br /> <br /> </td>
</tr><tr><td align="left" valign="top" id="margin"><form action="https://www.naturience.com/checkout/review.php" method="post" enctype="multipart/form-data" name="OrderForm" id="OrderForm" onsubmit="MM_validateForm('CCName','','R','CCNumber','','RisNum','CCcvv2','','RisNum','FirstName','' ,'R','LastName','','R','Address','','R','City','','R','Zip','','RisNum','Phone','','R','Email','','R isEmail','Shipping_FirstName','','R','Shipping_LastName','','R','Shipping_Address','','R','Shipping_ City','','R','Shipping_Zip','','RisNum');return document.MM_returnValue">
<input type="hidden" name="action" value="review" />

<p align="center" class="style11">Wrinkle Ease Kits</p>

<table border="0" align="center">
<tr>
<td valign="top">
<table border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#000000">
<tr bgcolor="#005B2E">
<td bgcolor="#005B2E"><span class="style24">Product</span></td>
<td><span class="style24">Price Each</span></td>
<td><span class="style24">Quantity</span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Wrinkle-Ease Kit Ultra</td>
<td>$305.00</td>
<td><input name="Ultra" type="text" size="8" /></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Wrinkle-Ease Kit Deluxe</td>
<td>$180.00</td>
<td><input name="Deluxe" type="text" size="8" /></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Wrinkle-Ease Kit Shower</td>
<td>$ 54.00</td>
<td><input name="Shower" type="text" size="8" /></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Wrinkle-Ease Kit Weekend</td>
<td>$ 20.00</td>
<td><input name="Weekend" type="text" size="8" /></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Wrinkle Resist Deluxe Kit</td>
<td>$ 98.00</td>
<td><input name="wrDeluxe" type="text" size="8" /></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Wrinkle Resist Weekend Getaway Kit</td>
<td>$ 18.00</td>
<td><input name="wrWeekend" type="text" size="8" /></td>
</tr>
<tr>
<td colspan="3" bgcolor="#FFFFFF" align="right">
Shipping Method:
<select name="Shipping">
<option value="Ground" selected="selected">Ground</option>
<option value="3rd-Day">3rd-Day Air</option>
<option value="ISE_Delivery">ISE Delivery</option>
</select>
</td>
</tr>
</table>
<br />
<div style="margin-left: 30px; margin-right: 15px;">
<span style="font-size:11px; width: 435px;">*All eligible discounts are automatically subtracted from total and will be reflected on form upon entering/ordering.</span>
</div>
</td>
</tr>
</table>
<br />
<table border="0" align="center">
<tr>
<td valign="top">
<table width="210" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF" class="style19">
<tr>
<td colspan="3" bgcolor="#005B2E"><div align="center" class="style24">Shipping Charges</div></td>
</tr>
<tr>
<td>Order In USD</td>
<td>Ground</td>
<td>3rd-Day</td>
</tr>
<tr>
<td>$20-$60</td>
<td>$ 6.85</td>
<td>$15.75</td>
</tr>
<tr>
<td>$61-$200</td>
<td>$ 11.71</td>
<td>$18.59</td>
</tr>
<tr>
<td>$201-$325</td>
<td>$ 15.34</td>
<td>$25.34</td>
</tr>
<tr>
<td>$326-$700</td>
<td>$ 17.37</td>
<td>$26.37</td>
</tr>
<tr>
<td>$701-$1000</td>
<td>$ 19.89</td>
<td>$29.74</td>
</tr>
<tr>
<td colspan="3"><div align="center">*Call for overnight shipping fee</div></td>
</tr>
</table>
</td>
</tr>
</table>

<br />
<table border="0" align="center">
<tr>
<td valign="top" align="center">
<p align="center"><strong>ISE Info:</strong>
<table width="215" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td align="left">ISE #: </td>
<td align="left"><input type="text" name="ISE" size="10" /></td>
</tr>
<tr>
<td align="left">ISE CODE: </td>
<td align="left"><input name="Discount_Code_ISE" type="text" size="10" maxlength="10" /></td>
</tr>
</table>
<em><span style="font-size: 12px">*for ISE users only</span></em>
</p>
</td>
<td width="5">&nbsp;</td>
<td valign="top" align="center">
<p align="center"><strong>COF Info:</strong>
<table width="215" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td align="left">COF CODE: </td>
<td align="left"><input name="Discount_Code" type="text" size="10" maxlength="10" /></td>
</tr>
</table>
<em><span style="font-size: 12px">*for COF users only</span></em>
</p>
</td>
<!-- removed due to clients wishes

</tr>
</table>
-->
</tr>
</table>

<!--

-->

<p align="center"><strong>Credit Card Info:</strong>
<table width="350" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td valign="top" align="left">
Name:
</td>
<td valign="top" align="left">
<input name="CCName" type="text" id="CCName" size="25" />
</td>
</tr>
<tr>
<td valign="top" align="left">
Card #:
</td>
<td valign="top" align="left">
<input name="CCNumber" type="text" id="CCNumber" size="25" />
</td>
</tr>
<tr>
<td valign="top" align="left">
Card Type:
</td>
<td valign="top" align="left">
<select name="CCType">
<option value="MasterCard" selected="selected">MasterCard</option>
<option value="Visa">Visa</option>
<option value="Discover">Discover</option>
<option value="Amex">American Express</option>
</select>
</td>
</tr>
<tr>
<td valign="top" align="left">
Security Code:
</td>
<td valign="top" align="left">
<input type="text" name="CCcvv2" size="4" id="CCcvv2" maxlength="5" /> <a href="images/cvv2.jpg" target="_blank"><img src="images/questionmark.jpg" width="14" height="14" border="0" alt="CVV2 Security Code" /></a>
</td>
</tr>
<tr>
<td valign="top" align="left">
Exp. Date:
</td>
<td valign="top" align="left">
<select name="CCExpMonth">
<option value="01" selected="selected">01 - January</option>
<option value="02">02 - February</option>
<option value="03">03 - March</option>
<option value="04">04 - April</option>
<option value="05">05 - May</option>
<option value="06">06 - June</option>
<option value="07">07 - July</option>
<option value="08">08 - August</option>
<option value="09">09 - September</option>
<option value="10">10 - October</option>
<option value="11">11 - November</option>
<option value="12">12 - December</option>
</select> /
<select name="CCExpYear">
<option value="2007" selected="selected">2007</option>
<option value="2008">2008</option>

</select>
</td>
</tr>
</table>
</p>
<br />
<p align="center">
<strong>Billing Address:</strong>
<table width="450" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td valign="top" align="left">First Name: </td>
<td valign="top" align="left"><input name="FirstName" type="text" id="FirstName" size="35" /></td>
</tr>
<tr>
<td valign="top" align="left">Last Name: </td>
<td valign="top" align="left"><input name="LastName" type="text" id="LastName" size="35" /></td>
</tr>
<tr>
<td valign="top" align="left">Address: </td>
<td valign="top" align="left"><input name="Address" type="text" id="Address" size="45" /></td>
</tr>
<tr>
<td valign="top" align="left">&nbsp;</td>
<td valign="top" align="left"><input name="Address2" type="text" size="45" /></td>
</tr>
<tr>
<td valign="top" align="left">City: </td>
<td valign="top" align="left"><input name="City" type="text" id="City" size="30" /></td>
</tr>
<tr>
<td valign="top" align="left">State: </td>
<td valign="top" align="left">
<select name="State">
<option value="AK" selected="selected">AK</option>
<option value="AL">AL</option>
<option value="AR">AR</option>

</select>
</td>
</tr>
<tr>
<td valign="top" align="left">Zip Code: </td>
<td valign="top" align="left"><input name="Zip" type="text" id="Zip" size="10" maxlength="5" /></td>
</tr>
<tr>
<td valign="top" align="left">Phone: </td>
<td valign="top" align="left"><input name="Phone" type="text" id="Phone" size="20" /></td>
</tr>
<tr>
<td valign="top" align="left">Email: </td>
<td valign="top" align="left"><input name="Email" type="text" id="Email" size="35" /></td>
</tr>
</table>
</p>
<p align="center">
<input type="checkbox" name="ShipAsBilled" value="Yes" onclick="this.form.Shipping_FirstName.value = this.form.FirstName.value;this.form.Shipping_LastName.value = this.form.LastName.value;this.form.Shipping_Address.value = this.form.Address.value;this.form.Shipping_Address2.value = this.form.Address2.value;this.form.Shipping_City.value = this.form.City.value;this.form.Shipping_State.value = this.form.State.value;this.form.Shipping_Zip.value = this.form.Zip.value;" />
Check here if Shipping Address is same as Billing Address
</p>
<p align="center"><strong>Shipping Address</strong>:
<table width="450" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td valign="top" align="left">First Name: </td>
<td valign="top" align="left"><input name="Shipping_FirstName" type="text" id="Shipping_FirstName" size="35" /></td>
</tr>
<tr>
<td valign="top" align="left">Last Name: </td>
<td valign="top" align="left"><input name="Shipping_LastName" type="text" id="Shipping_LastName" size="35" /></td>
</tr>
<tr>
<td valign="top" align="left">Address: </td>
<td valign="top" align="left"><input name="Shipping_Address" type="text" id="Shipping_Address" size="45" /></td>
</tr>
<tr>
<td valign="top" align="left">&nbsp;</td>
<td valign="top" align="left"><input name="Shipping_Address2" type="text" size="45" /></td>
</tr>
<tr>
<td valign="top" align="left">City: </td>
<td valign="top" align="left"><input name="Shipping_City" type="text" id="Shipping_City" size="30" /></td>
</tr>
<tr>
<td valign="top" align="left">State: </td>
<td valign="top" align="left">
<select name="Shipping_State">
<option value="AK" selected="selected">AK</option>
<option value="AL">AL</option>

</select>
</td>
</tr>
<tr>
<td valign="top" align="left">Zip Code: </td>
<td valign="top" align="left"><input name="Shipping_Zip" type="text" id="Shipping_Zip" size="10" maxlength="5" /></td>
</tr>
</table>
</p>
<p align="center">
<input type="reset" name="reset" value="Clear Form" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="submit" value="Review Order" />
</p>
</form>
<br />
</td>
</tr>
<tr>
<td height="10"><hr align="center" width="95%" /></td>
</tr>
<tr>
<td>
<p align="left" class="style10" id="margin">
**Note: We offer a 30-day, money-back guarantee on our Weekend Kits. Refunds will only be issued
with a requested Return Authorization # issued by customer service.
Call 1-888-331-6301 or email <a href="mailto:customerservice@naturience.com">customerservice@naturience.com</a>. Include receipt.
</p>
</td>
</tr>
<tr>
<td height="10"><hr align="center" width="95%" /></td>
</tr>
<tr>
<td>
<p align="center" class="style11">
Thank you for your interest in Naturience,<br />
the perfect blend of Nature and Science.
</p>
<p align="center" class="style13">
To inquire about or order one of our kits offline, please call 888-331-6301.
</p>
</td>
</tr>

<?php } ?>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: parse error, unexpected '/' - can anyone see the error in this code? v@ny@ Programming 8 04-03-2010 04:07 PM
What's the meaning of "PHP Parse error: parse error, unexpected $ in..." frandalla Programming 23 03-04-2009 12:34 PM
Parse error: parse error, unexpected '}' in /home/content jouvert Linux - Newbie 3 05-17-2008 06:55 PM
Parse error: parse error, unexpected $ in /home/content/d/o/m/domain/html/addpuppy2.p Scooby-Doo Programming 3 10-25-2007 09:41 AM
PHP parse error unexpected '>' ldp Programming 2 03-04-2005 02:20 PM


All times are GMT -5. The time now is 01:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration