NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Parse error: parse error, unexpected $

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-27-2005, 09:26 PM THREAD STARTER               #1 (permalink)
New Member
Join Date: Aug 2004
Location: Auburn, AL
Posts: 15
efriese is an unknown quantity at this point
 



Parse error: parse error, unexpected $


Getting this error: "Parse error: parse error, unexpected $ on line 41". I've looked at this code, but I know I'm missing something. Thanks in advance!

PHP Code:
<? 
printLog
("++++++ Constructing invoice records");
????: NamePros.com http://www.namepros.com/programming/102358-parse-error-parse-error-unexpected.html
$now date("YmdHis",$TIME);
$now2 date("Ymd",$TIME);
$dbquery "SELECT * FROM PHP_AUCTION_auctions
            WHERE ends <='
$NOW'
            AND ((closed='0')
            OR (closed='1')
                AND reserve_price > 0
                AND num_bids > 0
                AND current_bid < reserve_price
                AND sold='s'))"
;
????: NamePros.com http://www.namepros.com/showthread.php?t=102358

$get_auctions mysql_query($dbquery);

$auc_num mysql_num_rows($get_auctions);

if (
$auc_num 0) {
    while(
$a mysql_fetch_array($get_auctions)){
    
extract($a);

    
$auction_ID $ID;
    
$fee $current_bid*0.08;
    
$fee_rounded round($fee,2);

    
$record mysql_query("INSERT INTO PHPAUCTION_invoices VALUES ('NULL','$auction_ID','$user','$fee_rounded','$NOW')");
    
//log results
    
printLog("++++++ Invoicing Successful!");
}
?>
efriese is offline  
Old 06-27-2005, 09:29 PM   #2 (permalink)
Account Closed
 
axilant's Avatar
Join Date: May 2004
Location: /etc/passwd
Posts: 2,178
axilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to behold
 

Member of the Month
July 2005

Its pretty aparent that that is not the full code

Post it all...

If you really want to help give me a url... to the file with the error
and copy that file and make it a .phps so i can see the source.
axilant is offline  
Old 06-28-2005, 12:37 AM   #3 (permalink)
Senior Member
 
Kodeking's Avatar
Join Date: Jun 2003
Location: Naperville Illinois
Posts: 1,786
Kodeking is just really niceKodeking is just really niceKodeking is just really niceKodeking is just really nice
 



Full code doesn't matter. He is missing an instance of the closing brackets: }

Stick another } at the end, or where you want the while loop to close.
__________________
Quote:
Clan-Forums.com >> $30 BoardingForum.com >> $100
TalkWebHosting.com >> $200 AvoidChapter13.com >> $100
Send PM to make lesser offers on the above names.
Kodeking is offline  
Old 06-28-2005, 03:34 AM   #4 (permalink)
Senior Member
 
Porte's Avatar
Join Date: May 2005
Location: I'm right here
Posts: 3,526
Porte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud of
 



As KodeKing mentiond so your code should be:

Quote:
if ($auc_num > 0) {
while($a = mysql_fetch_array($get_auctions)){
????: NamePros.com http://www.namepros.com/showthread.php?t=102358
extract($a);

$auction_ID = $ID;
$fee = $current_bid*0.08;
$fee_rounded = round($fee,2);

$record = mysql_query("INSERT INTO PHPAUCTION_invoices VALUES ('NULL','$auction_ID','$user','$fee_rounded','$NOW ')");
//log results
printLog("++++++ Invoicing Successful!");
}
}
?>
Porte is offline  
Old 06-28-2005, 05:55 AM THREAD STARTER               #5 (permalink)
New Member
Join Date: Aug 2004
Location: Auburn, AL
Posts: 15
efriese is an unknown quantity at this point
 



That did the trick. Thanks!
efriese is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP parse error! Help please? drmaximus Programming 10 04-07-2004 07:36 PM
PHP Parse Error... do you see it? Jeanco Programming 8 12-31-2003 02:33 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 07:21 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger