Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
help with $_SERVER['REQUEST_URI'] statement
Old 06-13-2010, 06:31 PM help with $_SERVER['REQUEST_URI'] statement
Skilled Talker

Posts: 53
Trades: 0
When I use the code

PHP Code:
<?php
$path 
$_SERVER['REQUEST_URI']; 
echo 
$path;
?>
I get an echo similar to "/example/index.php?a=test". I was wondering if it was possible to only echo out what follows the "=" sign? Any ideas?
worldy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-14-2010, 08:40 AM Re: help with $_SERVER['REQUEST_URI'] statement
Defies a Status

Posts: 1,606
Trades: 0
You can explode($path) using the = sign as the break point and the echo the result.

http://www.php.net/manual/en/function.explode.php
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 06-14-2010, 11:11 AM Re: help with $_SERVER['REQUEST_URI'] statement
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
$_GET['a'] is what you need
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 06-22-2010, 09:04 AM Re: help with $_SERVER['REQUEST_URI'] statement
Average Talker

Posts: 16
Trades: 0
echo $_REQUEST['a'] another posibility
__________________

Please login or register to view this content. Registration is FREE
- FileREX.com is an internet download website, from where you can download high-quality software.
perseadrian is offline
Reply With Quote
View Public Profile
 
Old 06-22-2010, 01:48 PM Re: help with $_SERVER['REQUEST_URI'] statement
Super Talker

Posts: 144
Name: Nick Mallare
Location: Olathe, KS
Trades: 0
While true for $_GET vs $_REQUEST, I would highly recommend only using $_POST and not $_REQUEST when you are wanting POST to a page. Otherwise, someone could send the parameters via the URL [GET] and have the same results.

Nick
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
nmallare is offline
Reply With Quote
View Public Profile Visit nmallare's homepage!
 
Reply     « Reply to help with $_SERVER['REQUEST_URI'] statement
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.41134 seconds with 12 queries