Page 1 of 1

[SOLVED] Errors when using $_POST, $_GET and $_SERVER arrays

Posted: Fri Jun 24, 2005 1:49 pm
by Critta
Whenever I try to use $_POST, $_GET and $_SERVER, I get the error message:

Fatal error: Call to undefined function: array()

I have read in several examples that these should allow me to access form and querystring data but I cannot for the life of me make them work.

Any ideas why this is? Do I need to define something somewhere to make these arrays work.

Cheers in advance.

Posted: Fri Jun 24, 2005 1:57 pm
by dethron
are you able to define arrays? try the following

Code: Select all

<?php
$array = array(1, 1, 1, 1,  1, 8 => 1,  4 => 1, 19, 3 => 13);
print_r($array);
?>

Posted: Fri Jun 24, 2005 2:16 pm
by Critta
Don't worry, I've worked it out... as usual it was a syntax problem :S

still having problems remembering when to use {, [ and ( :oops:

Cheers for the suggestion though!

Posted: Fri Jun 24, 2005 2:18 pm
by dethron
can you add [SOLVED] to your subject?

Posted: Sat Jun 25, 2005 8:44 am
by Critta
no worries, done!

now got the project fully working here

hoorah!

Posted: Sat Jun 25, 2005 3:40 pm
by Ambush Commander
No quotes for URL tags, it's:

here