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
Old 05-20-2009, 05:42 PM PHP Question mark ?
Knight13's Avatar
Defies a Status

Posts: 10,289
Name: Knight13
Location: Cleveland, Ohio
Trades: 0
I see a lot of scripts that have links that has question marks in them and i would like to know what the question marks means. Thanks!!!

Example
Code:
<a href=books.php?username=blank>blank</a>
Knight13 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-20-2009, 05:56 PM Re: PHP Question mark ?
Experienced Talker

Posts: 31
Trades: 0
I am not sure what the question mark means, but in the above case, there will be GET variables in the URL which can be referenced by the books.php script like so:

PHP Code:
$var $_GET['username'];
echo 
$var;// this will give the string "blank" 
GrantMePeace is offline
Reply With Quote
View Public Profile
 
Old 05-20-2009, 05:57 PM Re: PHP Question mark ?
Experienced Talker

Posts: 31
Trades: 0
There are other cases in PHP where the question mark means something. It's like a short hand way of setting a variable based on a boolean expression.

http://www.wellho.net/mouth/1825_Que...-and-PHP-.html
GrantMePeace is offline
Reply With Quote
View Public Profile
 
Old 05-20-2009, 08:43 PM Re: PHP Question mark ?
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
The "?" question mark in this case has nothing to do with PHP at all. This is a format that the URL uses to seperate the URI path and defined parameters. The amperstand "&" is used to delimit each defined parameter key. The hash "#" is used at the end of an URL to assign the anchor point of the landing page.


http://www.domain.com/path/page.html?parameter1=value1&parameter2=value2#anchor

Color Key:
protocol
sub-domain
domain
path
file
parameter
value
anchor
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 05-20-2009, 11:54 PM Re: PHP Question mark ?
Experienced Talker

Posts: 47
Name: Bryan Williamz
Trades: 0
it tells the parameters passing start in url
__________________

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

cdesignz is offline
Reply With Quote
View Public Profile
 
Old 05-21-2009, 02:33 PM Re: PHP Question mark ?
Knight13's Avatar
Defies a Status

Posts: 10,289
Name: Knight13
Location: Cleveland, Ohio
Trades: 0
Thanks guys that's what i was looking for.
Knight13 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP Question mark ?
 

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.25073 seconds with 12 queries