Jump to content


Photo

PHP AND html in variable


  • Please log in to reply
1 reply to this topic

#1 drophit

drophit
  • Members
  • Pip
  • Newbie
  • 1 posts

Posted 21 March 2006 - 11:26 PM

I am trying to setup a variable and store some code to display but am haveing some probs see code below

<CODE>
$insert_results = ('<form action="CDDuplicationStepFive.php" method="post" name="form1">
<p class="MainContentBlue">We offer multiple Insert Printing options </p>
<p class="MainContent">
<select name="printing" class="MainContentSmallBolder" id="printing">
'
do {
'
<option value="<?php echo $row_all_cds[\'print_id\']?>">' echo $row_all_cds['print_name']' - add ' echo $row_all_cds['print_retail']'</option>
'
} while ($row_all_cds = mysql_fetch_assoc($all_cds));
$rows = mysql_num_rows($all_cds);
if($rows > 0) {
mysql_data_seek($all_cds, 0);
$row_all_cds = mysql_fetch_assoc($all_cds);
}
'
</select>
<a href="#" class="MainContentVerySmall" onClick="MM_openBrWindow(\'../AutoHelp.php?sub=InsertPrinting\',\'HELP\',\'scrollbars=yes,width=375,height=400\')">HELP!</a></p>
<p>
<input name="Submit" type="submit" class="MainContentVerySmall" value="CONTINUE">
</p>
</form> ');

}
else
{

$quote['printing_name'] = "None";
$quote['printing_retail'] = ".00";
header("Location: CDDuplicationStepFive.php");

}
</CODE>

Getting:

Parse error: parse error, unexpected T_DO in /wizard/CDDuplicationStepFourA.php on line 36

PLEASE help me!!

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 22 March 2006 - 12:05 AM

You're not terminating your statements with a semi-colon. I see lone single quotes in your code. You're attempting to store something in a variable and never using it anywhere. How are you expecting to show what you stored? You don't need parenthesis around strings.

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users