TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-06-2008, 08:02 PM   #1 (permalink)
The Visitor
 
Join Date: Jun 2008
Posts: 2
Thanks: 1
eple is on a distinguished road
Confused 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 :)
eple is offline  
Reply With Quote
Old 06-06-2008, 08:06 PM   #2 (permalink)
The Contributor
 
Join Date: May 2008
Location: Denmark
Posts: 70
Thanks: 3
SpYkE112 is on a distinguished road
Default

PHP Code:
<?php
echo($_GET['page']); // Outputs "index" with your url :)
?>
SpYkE112 is offline  
Reply With Quote
The Following User Says Thank You to SpYkE112 For This Useful Post:
eple (06-06-2008)
Old 06-06-2008, 08:10 PM   #3 (permalink)
The Visitor
 
Join Date: Jun 2008
Posts: 2
Thanks: 1
eple is on a distinguished road
Default

Thanks alot :)

I found out why it havn't worked for me :/
I've tried with $_GET too. But that was with "( )" insteed of "[ ]" :)
eple is offline  
Reply With Quote
Old 06-06-2008, 08:18 PM   #4 (permalink)
The Contributor
 
Join Date: May 2008
Location: Denmark
Posts: 70
Thanks: 3
SpYkE112 is on a distinguished road
Default

Well, thats because it an array you use the cornered brackets.. ;)
SpYkE112 is offline  
Reply With Quote
Old 06-06-2008, 08:29 PM   #5 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

PHP: Predefined variables - Manual

Is a good reference place to start in regards to what you're trying to do.
-m
delayedinsanity is offline  
Reply With Quote
Old 06-08-2008, 10:36 AM   #6 (permalink)
The Wanderer
 
Join Date: May 2008
Posts: 10
Thanks: 0
Folio is on a distinguished road
Default

"()" usually indicates a function and "[]" an array
you were almost there :)
Folio is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 10:52 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design