General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 14th, 2004, 11:08 AM
Robbo Robbo is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 14 Robbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old January 14th, 2004, 11:09 AM
Robbo Robbo is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 14 Robbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry at line 21

Reply With Quote
  #3  
Old January 14th, 2004, 02:53 PM
digitalamit digitalamit is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: New Delhi, India
Posts: 19 digitalamit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to digitalamit Send a message via AIM to digitalamit Send a message via Yahoo to digitalamit
You need to the query in the string.

You have put the starting quote but not the ending quote

PHP Code:
 $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'"



HTH!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Parse error: parse error, unexpected T_STRING


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT