PHP Forum Script Line 8 Eror

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

WherezHost

Established Member
Impact
1
Well i read a tutorial of how to make your own forum script. Ive done all the steps but now when you visit www.gamehatch.net/forums/forums.php you get the eror:
PHP:
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/gamehat/public_html/forums/forums.php on line 8

Line 8 is blank and its ment to be blank but ill give you line 8 and 10

PHP:
8-   $1 = $row['numrows'];    
9-
10- $query = "SELECT COUNT(id) AS numrows FROM forumboards WHERE category='2'";

Please help me out here coz im not good with PHP. Ill deliever some NP$ down if anyone cant sort this.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
The $1 is your problem. You have to start a variable with a letter and not a number. Try to change that and it should work.
 
Last edited:
0
Close
What shall i change it to? I really suck at PHP.
 
0
Close
You'd have to change all instances of $1 in your script to something such as $one.
 
0
Close
Or any $variable except $# where # is an integer.
 
0
Close
or u can just make it $r1 instead of $1 if u dont wanna type it out.
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back