TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Variables, need some help (http://www.talkphp.com/absolute-beginners/2916-variables-need-some-help.html)

eple 06-06-2008 08:02 PM

Variables, need some help
 
Hi,
I want to use the file.php?page=index thing.
The problem is that, I don't manage to find back the "page". What is it saved like? $_POST('page') don't work.

Please help :)

SpYkE112 06-06-2008 08:06 PM

PHP Code:

<?php
echo($_GET['page']); // Outputs "index" with your url :)
?>


eple 06-06-2008 08:10 PM

Thanks alot :)

I found out why it havn't worked for me :/
I've tried with $_GET too. But that was with "( )" insteed of "[ ]" :)

SpYkE112 06-06-2008 08:18 PM

Well, thats because it an array you use the cornered brackets.. ;)

delayedinsanity 06-06-2008 08:29 PM

PHP: Predefined variables - Manual

Is a good reference place to start in regards to what you're trying to do.
-m

Folio 06-08-2008 10:36 AM

"()" usually indicates a function and "[]" an array
you were almost there :)


All times are GMT. The time now is 06:44 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0