e1seix Posted September 10, 2007 Share Posted September 10, 2007 Parse error: syntax error, unexpected T_STRING in /home/dogfight/public_html/productDetails.php on line 29 this message keeps appearing for my code and i can't fathom exactly where my code is incorrect... Line 29: echo "<table style='width:100%'>"; am i really missing something here? Link to comment https://forums.phpfreaks.com/topic/68645-really-strange-error-any-ideas/ Share on other sites More sharing options...
teng84 Posted September 10, 2007 Share Posted September 10, 2007 that is correct i guess the error is on top of that line can you give us at least 10 lines before that line you posted? Link to comment https://forums.phpfreaks.com/topic/68645-really-strange-error-any-ideas/#findComment-345071 Share on other sites More sharing options...
e1seix Posted September 10, 2007 Author Share Posted September 10, 2007 $sku = $_GET['sku']; $fetch=mysql_query("SELECT * FROM fragrances WHERE sku=$sku UNION SELECT * FROM skincare WHERE sku=$sku UNION SELECT * FROM shaving WHERE sku=$sku UNION SELECT * FROM bodycare WHERE sku=$sku UNION SELECT * FROM hairacre WHERE sku=$sku UNION SELECT * FROM suncare WHERE sku=$sku")or die(mysql_error());") while($row = mysql_fetch_array( $fetch )) { echo $row[title].' | '.$row[brand].' - '.$row.' '.$row[type].' only £'.$row[£]; } ?>! DOGFIGHTUK Men's Grooming</title> <link rel=\"stylesheet\" type=\"text/css\" href=\"/main.css\" /> </head> <body> <?php echo "<table style='width:100%'>"; echo "<tr><td align='center' width='100%'>"; echo "<table class='body_table'>"; echo "<tr><td class='top_links' colspan='3'>"; include('http://www.dogfightuk.com/top_links.php'); echo "</td></tr>"; echo "<tr><td class='date_row' colspan='3' valign='top'>"; there you go, some before and some after. it's the first time i've used the UNION function so i expect to come across a few errors on the way down. lol Link to comment https://forums.phpfreaks.com/topic/68645-really-strange-error-any-ideas/#findComment-345073 Share on other sites More sharing options...
Fadion Posted September 10, 2007 Share Posted September 10, 2007 If i remember it right, "%" must be escaped so try: "<table style='width:100\%'>"; Link to comment https://forums.phpfreaks.com/topic/68645-really-strange-error-any-ideas/#findComment-345079 Share on other sites More sharing options...
e1seix Posted September 10, 2007 Author Share Posted September 10, 2007 no that ain't working neither. lol. any other ideas. i really can't figure it out! Link to comment https://forums.phpfreaks.com/topic/68645-really-strange-error-any-ideas/#findComment-345080 Share on other sites More sharing options...
teng84 Posted September 10, 2007 Share Posted September 10, 2007 die(mysql_error());") <--- this is your error should be die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/68645-really-strange-error-any-ideas/#findComment-345082 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.