Current location: Hot Scripts Forums » Programming Languages » PHP » Small error.


Small error.

Reply
  #1 (permalink)  
Old 07-08-05, 05:51 PM
Lafa's Avatar
Lafa Lafa is offline
Newbie Coder
 
Join Date: Jul 2005
Location: Moss, Norway
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Small error.

PHP Code:

<?php

include('dbclass.php');

$db = new db();
$db->connect($dbuser$dbpass$dbhost$dbname);

$query $db->query("SELECT * FROM 'programs' ORDER BY 'id'";

echo 
"<table border=\"0\" width=\"600\">\n";
while(
$db->fetch_array($query)) {
    echo 
"<td>" $row[id] . "</td><td><a href=\"localhost\"" $row[link] . ">" $row[name] . "</a></td>";
}
echo 
"</tabel>";
echo 
"<a href=\"admin.php\">Admin Panel</a>";
?>
the error i get is:

Parse error: parse error, unexpected ';' in /srv/www/htdocs/index.php on line 7

any ideas?
__________________
TUXRocks, you dont.

Push it to the limit
Reply With Quote
  #2 (permalink)  
Old 07-08-05, 06:07 PM
DetroitGuy DetroitGuy is offline
Newbie Coder
 
Join Date: Jun 2005
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

<?php

include('dbclass.php');

$db = new db();
$db->connect($dbuser$dbpass$dbhost$dbname);

$query $db->query("SELECT * FROM 'programs' ORDER BY 'id'");

echo 
"<table border=\"0\" width=\"600\">\n";
while(
$db->fetch_array($query)) {
    echo 
"<td>" $row[id] . "</td><td><a href=\"localhost\"" $row[link] . ">" $row[name] . "</a></td>";
}
echo 
"</tabel>";
echo 
"<a href=\"admin.php\">Admin Panel</a>";
?>
Reply With Quote
  #3 (permalink)  
Old 07-08-05, 06:10 PM
Lafa's Avatar
Lafa Lafa is offline
Newbie Coder
 
Join Date: Jul 2005
Location: Moss, Norway
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
thanks im getting to tired, dident notice the missing ')'

gonna try it now.
__________________
TUXRocks, you dont.

Push it to the limit
Reply With Quote
  #4 (permalink)  
Old 07-08-05, 07:21 PM
DetroitGuy DetroitGuy is offline
Newbie Coder
 
Join Date: Jun 2005
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
I do it all the time. Don't feel bad at all.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
config Apache small error! KroAn PHP 3 01-22-06 02:19 PM
ASP upload prob minority ASP 1 06-27-05 08:35 AM
Error: 500 Can't connect to ppm.ActiveState.com:80 (connect: Unknown error) padmanaban_bala Perl 2 05-03-05 05:00 PM
Small Business Server 2003 ASP or .NET problem mf_read ASP.NET 1 03-27-04 04:02 PM
[php error] parse error | fatal error xeoHosting PHP 1 01-03-04 08:12 PM


All times are GMT -5. The time now is 06:54 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.