Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/thesmi6/public_html/registration2.php on line 266
266 starts at the code:
Code: <?php
include("inc/dbconnect.php");
$cat_sql = "SELECT * FROM categories order by display_order";
while ($cat_row = mysql_fetch_array($cat_sql))
{
echo "267"; //$navigation_name = "$cat_row['navigation_name']";
$navigation_name2 = '$cat_row["navigation_name"]';
$type = '$cat_row["type"]';
if($type == "sub") {$navigation_name2 = " $navigation_name"; }
echo "<option value='".$navigation_name."'>".$navigation_name2."</option>" ;
}
?>
I tried to do these lines many ways but not sure if this can even be done at all...
I think it may have something to do with how its in a function but not positive of that either.
Code: $html_form = <<< END_HTML
<form method="POST" action="registration2.php" name="reg_form">
<input type="hidden" name="action" value="submit">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10"> </td>
<td width="630" valign="top"><table width="642" height="596" border="0" cellpadding="0" cellspacing="0" background="images/registrationbox1.png" STYLE=" background-repeat:no-repeat; background-position:top;">
<tr>
<td width="21" height="40"> </td>
<td colspan="3"><div align="center"><span class="style20">Register Now! </span></div></td>
<td width="30"> </td>
</tr>
<tr>
<td rowspan="19"> </td>
<td width="199" height="23" valign="middle"><div align="right" class="style11">* UserName : </div></td>
<td width="9" height="23" valign="middle"> </td>
<td width="383" height="23" valign="middle"><input name="username" type="text" value="$username" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['username']}</span></td>
<td rowspan="19"> </td>
</tr>
<tr>
<td height="23"><div align="right" class="style11">* Password : </div></td>
<td width="9" height="23"> </td>
<td height="23" valign="middle"><input name="password" type="password" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['password']}</span></td>
</tr>
<tr>
<td height="23"><div align="right" class="style11">* Password Again: </div></td>
<td width="9" height="23"> </td>
<td height="23" valign="middle"><input name="password2" type="password" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['password2']}</span></td>
</tr>
<tr>
<td height="23"><div align="right" class="style11">* Advertiser Name : </div></td>
<td width="9" height="23"> </td>
<td height="23" valign="middle"><label>
<input name="ad_name" type="text" value="$ad_name" class="style2" size="35" />
</label>
<span style="color:{$ErrColor};"> {$formError['ad_name']}</span></td>
</tr>
<tr>
<td height="23"><div align="right" class="style11">* Contact Name : </div></td>
<td width="9" height="23"> </td>
<td height="23" valign="middle">
<input name="cname" type="text" value="$cname" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['cname']}</span></td>
</tr>
<tr>
<td height="23"><div align="right" class="style11">* Phone :
</div> </td>
<td width="9" height="23"> </td>
<td height="23" valign="middle"><input name="phone" type="text" value="$phone" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['phone']}</span></td>
</tr>
<tr>
<td height="23" valign="middle"><div align="right" class="style11">Email : </div></td>
<td height="23" valign="middle"> </td>
<td height="23" valign="middle"><input name="email" type="text" value="$email" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['email']}</span></td>
</tr>
<tr>
<td height="23" valign="middle"><div align="right" class="style11">* Billing Address : </div></td>
<td height="23" valign="middle"> </td>
<td height="23" valign="middle"><input name="b_address" type="text" value="$b_address" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['b_address']}</span></td>
</tr>
<tr>
<td height="23" valign="middle"><div align="right" class="style11">* City : </div></td>
<td height="23" valign="middle"> </td>
<td height="23" valign="middle"><input name="city" type="text" value="$city" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['city']}</span></td>
</tr>
<tr>
<td height="23" valign="middle"><div align="right" class="style11">* State : </div></td>
<td height="23" valign="middle"> </td>
<td height="23" valign="middle"><input name="state" type="text" value="$state" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['state']}</span></td>
</tr>
<tr>
<td height="23" valign="middle"><div align="right" class="style11">* Zip Code : </div></td>
<td height="23" valign="middle"> </td>
<td height="23" valign="middle"><input name="zip" type="text" value="$zip" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['zip']}</span></td>
</tr>
<tr>
<td height="23" valign="middle"><div align="right" class="style11">* # categories/coupons : </div></td>
<td height="23" valign="middle"> </td>
<td height="23" valign="middle"><p>
<label>
<input type="radio" name="num_cat" value="1" />
<span class="style11">1</span></label>
<label>
<input type="radio" name="num_cat" value="2" />
<span class="style11">2</span></label>
<label>
<input type="radio" name="num_cat" value="3" />
<span class="style11">3</span></label>
<span style="color:{$ErrColor};"> {$formError['num_cat']}</span>
</p></td>
</tr>
<tr>
<td height="23" valign="middle"><div align="right" class="style11">* category heading(s) : </div></td>
<td height="23" valign="middle"> </td>
<td height="23" valign="middle"><select name="select_cat" class="style14">
<option value="Select Categories">Select Categories</option>
<?php
include("inc/dbconnect.php");
$cat_sql = "SELECT * FROM categories order by display_order";
while ($cat_row = mysql_fetch_array($cat_sql))
{
echo "267"; //$navigation_name = "$cat_row['navigation_name']";
$navigation_name2 = '$cat_row["navigation_name"]';
$type = '$cat_row["type"]';
if($type == "sub") {$navigation_name2 = " $navigation_name"; }
echo "<option value='".$navigation_name."'>".$navigation_name2."</option>" ;
}
?>
</select></td>
</tr>
<tr>
<td height="23" valign="middle"><div align="right" class="style11">web address : </div></td>
<td height="23" valign="middle"> </td>
<td height="23" valign="middle"><input name="web_address" type="text" value="$web_address" class="style2" size="35" />
<span style="color:{$ErrColor};"> {$formError['web_address']}</span></td>
</tr>
<tr>
<td height="50" colspan="3" valign="top"><div align="center">
<label> <br />
<input type="submit" name="Submit" value="Submit" />
</label> <label>
<input type="reset" name="Submit2" value="Reset" />
</label>
</div></td>
</tr>
</table></td>
<td width="16"> </td>
<td width="222" valign="top" background="images/infobox2.png" STYLE=" background-repeat:no-repeat; background-position:top;"><table width="100%" height="361" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="8" rowspan="9"> </td>
<td width="87%" height="55"> </td>
<td width="5" rowspan="9"> </td>
</tr>
<tr>
<td height="34"><span class="style19">Phone: </span><span class="style2">(740) 555 - 6677</span><span class="style19"> Fax: </span><span class="style2">(740) 666 - 8899 </span></td>
</tr>
<tr>
<td height="32" valign="bottom"><span class="style19">Email:</span></td>
</tr>
<tr>
<td height="26" valign="middle"><span class="style2">info@buckeyediscount.com</span></td>
</tr>
<tr>
<td height="25"> </td>
</tr>
<tr>
<td height="56" align="center" valign="middle"><img src="images/facebooklink.jpg" width="171" height="56" border="0" usemap="#Map" /></td>
</tr>
<tr>
<td height="25"> </td>
</tr>
<tr>
<td height="76" align="center" valign="middle"><img src="images/twitterlink.jpg" width="169" height="76" border="0" usemap="#Map2" /></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<map name="Map" id="Map">
<area shape="rect" coords="3,3,167,49" href="http://www.facebook.com" />
</map>
<map name="Map2" id="Map2">
<area shape="rect" coords="2,4,159,66" href="http://www.twitter.com" />
</map>
</td>
<td width="10"> </td>
</tr>
</table>
</form>
END_HTML;
in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a would do)Example:<a href="#">like</a></td> <td><a
Creating XML with php
I need to creat an XML with php and have successfully produced a valid output. The problem I have is that the XML requirements of the application that will import the XML requires that the XML file
form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how do i do this?Code: <?php echo "<form enctype='multipart/form-data'
ereg_replace in Wordpress
Heya - so I'm working on this site: http://world-of-smiles.theportlandco.com/new-patientsThe site is built off Wordpress and I'm getting the pages title using Wordpress function: Line number On/Off |
Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to another and whoever they have subscribed to is echoed back on there profile page. my users table
2 things: enter doesn't work in IE & empty form
i have this search form that works well except for 2 things.1) on IE when i hit enter instead of the Submit button, i do not get any result. with firefox, no problem.2) when i hit submit or enter
HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc send and then the table belpw only Job location sends and the other columns do not send. is this a html
getting Vars to pass to next page.
Hello all, I have a confusing situation on my hands, i am a member of a gaming community and we are setting up a website (yay i get to be teh techie!!) im not exactly a noob with php but i am by far
need help in update query
i create a form for update. there are 8 columns in my mysql table. on my main page all the data is retrieve from db and displayed on the page. after every row there is a link edit. when user click
Image DPI
Hi.I allow users to upload images, the user then is able to adjust several settings for the image:- Image quality (10 - 100)- watermark position(s) (top left/right, middle, bottom left/right)when the