Jump to content

coding help


s_ainley87

Recommended Posts

Hello,

 

I get this error when I load my page,

 

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jetexed/public_html/store/attempt.php on line 54

 

// add these details to $gf which will be used later to write the googleform
	$gf = $gf + "<input type=\"hidden\" name=\"item_description_$count\" value=\"$row['category_name']\" />";
	$gf = $gf + "<input type=\"hidden\" name=\"item_name_$count\" value=\"$row['product_name']\" />";
	$gf = $gf + "<input type=\"hidden\" name=\"item_price_$count\" value=\"$_SESSION['cart'][$row['product_id']]['price']\" />";
	$gf = $gf + "<input type=\"hidden\" name=\"item_quantity_$count\" value=\"$_SESSION['cart'][$row['product_id']]['quantity']\"/>";
	$gf = $gf + "<input type=\"hidden\" name=\"item_currency_$count\" value=\"GBP\"/>";

 

Can someone show what I done wrong please?

Link to comment
https://forums.phpfreaks.com/topic/103182-coding-help/
Share on other sites

I think this is what your meaning to do:

 

<?php

// add these details to $gf which will be used later to write the googleform
$gf .= "<input type=\"hidden\" name=\"item_description_$count\" value=\"$row['category_name']\" />";
$gf .= "<input type=\"hidden\" name=\"item_name_$count\" value=\"$row['product_name']\" />";
$gf .= "<input type=\"hidden\" name=\"item_price_$count\" value=\"$_SESSION['cart'][$row['product_id']]['price']\" />";
$gf .= "<input type=\"hidden\" name=\"item_quantity_$count\" value=\"$_SESSION['cart'][$row['product_id']]['quantity']\"/>";
$gf .= "<input type=\"hidden\" name=\"item_currency_$count\" value=\"GBP\"/>";

?>

Link to comment
https://forums.phpfreaks.com/topic/103182-coding-help/#findComment-528508
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.