s_ainley87 Posted April 27, 2008 Share Posted April 27, 2008 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 More sharing options...
pocobueno1388 Posted April 27, 2008 Share Posted April 27, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.