Dynadot โ€” .com Registration $8.99

PHP Forum Script Line 8 Eror

Spaceship Spaceship
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
•••
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
•••
What shall i change it to? I really suck at PHP.
 
0
•••
You'd have to change all instances of $1 in your script to something such as $one.
 
0
•••
Or any $variable except $# where # is an integer.
 
0
•••
or u can just make it $r1 instead of $1 if u dont wanna type it out.
 
0
•••
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back