|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Parse error: parse error, unexpected T_STRING
Can anyone please help me with this when trying to run this it of code i keep getting this error.
<html> <head></head> <body> <?php import_request_variables("gp","tt_"); $connection = mysql_connect($host,$user,$password) or die ("couldn't connect to server"); $db = mysql_select_db($database,$connection) or die ("Couldn't select database"); $query = "SELECT ana_name, ana_familyname, addresstype_name, address_housenumber, address_road, address_city, address_county, address_postcode, address_email, address_contactphoneno FROM ana_tbl, addresstype_tbl, address_tbl WHERE ana_name ='$tt_ana_name'; $result = mysql_query($query) or die ("Could Not execute Query"); /* Display results in a table */ echo "<h1>Contact Details</h1>"; echo "<table cellspacing='15'>"; echo "<tr><td colspan='10'><hr></td></tr>"; while ($row = mysql_fetch_array($result)) { extract($row); echo "<tr>\n <td>$tt_ana_name</td>\n <td>$tt_ana_familyname</td>\n <td $tt_addresstype_name</td>\n <td $tt_address_housenumber</td>\n <td $tt_address_road</td>\n <td $tt_address_city</td>\n <td $tt_address_county</td>\n <td $tt_address_postcode</td>\n <td $tt_address_email</td>\n <td $tt_address_contactphoneno</td>\n </tr>\n"; echo "<tr><td colspan='10'><hr></td></tr>\n"; } echo "</table>\n"; ?> </body> </html> Parse error: parse error, unexpected T_STRING Thanks alot |
|
#2
|
|||
|
|||
|
Sorry at line 21
|
|
#3
|
|||
|
|||
|
You need to the query in the string.
You have put the starting quote but not the ending quote PHP Code:
HTH! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Parse error: parse error, unexpected T_STRING |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|