» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-09-2006, 12:26 PM
lampard lampard is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
lampard is on a distinguished road
Thumbs down T_string!!!!!!!!!!!

Getting this error but do not know why?? can u help??


Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/myaccount/public_html/folder/my account.php on line 16.
Here is the code I am working with:

PHP Code:
require "config2.php";
$query = "SELECT username, password, email, comments FROM users WHERE username=$username";
$result = mysql_query($query) or die("Could not select data from the database because: ". mysql_error());
while($row = mysql_fetch_array($result)){
echo "<b>Edit your Account</b>";
echo "<form action=account.php method=post>";
// line 16
echo "Username: ".'$row['username']'."<br> E-mail address: <input name=email type=text value=".'$row['email']'."><br /><a href=comments.php>View comments</a> <br /> -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-09-2006, 12:28 PM
tyler tyler is offline
OSP Starters
 
Join Date: Mar 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
tyler is on a distinguished road
Default

Replace '$row['username']' with simply $row['username'] - same for 'email'

echo "Username: ".$row['username']."<br> E-mail address: <input name=email type=text value=".$row['email']."><br /><a href=comments.php>
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

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
Forum Jump


All times are GMT. The time now is 09:47 PM.