Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 344
0 Users 7 Guests Online
Forum Index » Tutorials » usersystem Poll error
Posted on Friday 13th June 2008 at 02:33 PM
Adam981
templates/default/images/noavatar.png's Avatar
Junior Member
Well i get this error.

Code
Parse error: syntax error, unexpected '[' in /home/crystal/public_html/adminpoll.php on line 18[/code/
Heres adminpoll.php lines 12-28

PHP Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
if ($logged['username'] && $logged['userlevel'] == "6") { // checks if user is logged in and an admin

switch($_GET['delete']) {

default:

if (!_POST['addpoll']) {

$check = mysql_query(mysql_fetch_array( "SELECT * FROM `polls`" ));

$checks = mysql_num_rows($check); // counts for polls

if ($checks == "1") { //haha sorry one poll at a time

echo ( "You can only have one poll at a time, please delete the current one by clicking <a href='adminpoll.php?action=delete&id=check[id]'>" ); // delete old poll first :)


Line 18 is

PHP Code
1
if (!_POST['addpoll']) {


Hope someone can help :)
Posted on Sunday 15th June 2008 at 04:43 AM
ShadowMage
templates/default/images/noavatar.png's Avatar
Senior Member
Code

if (!_POST['addpoll']) {


Should Be:
Code

if (!$_POST['addpoll']) {