Server Help

Non-Subspace Related Coding - The use in ? in php

tcsoccerman - Mon Oct 13, 2008 4:16 pm
Post subject: The use in ? in php
This was hard to google, and didn't return right results. The question is, what does the ? in a php url represent? For example, the url i am in right now on these forums is http://forums.minegoboom.com/makepost.php?mode=createpost&f=21

so does that mean $_SESSION['mode'] = 'createpost';? and i guess $_SESSION['f'] = 21?

-tcsoccerman

Also, is their a name for this "?" usage?
Mine GO BOOM - Mon Oct 13, 2008 4:37 pm
Post subject:
Query string. And in PHP, it would be $_GET or $_REQUEST, not session.
k0zy - Mon Oct 13, 2008 4:39 pm
Post subject:
There are two ways to submit form data.
GET and POST.

The one with the ? is the GET way. Where the form data is appended to the url in name-value-pairs.

To access the data in php you have to do $_GET['nameofthevariable']

http://www.w3schools.com/PHP/php_get.asp
tcsoccerman - Mon Oct 13, 2008 4:51 pm
Post subject:
Thanks for the quick replies, very clear now.
Samapico - Mon Oct 13, 2008 8:03 pm
Post subject:
Cool... I just learned some php too
tcsoccerman - Fri Oct 17, 2008 4:47 pm
Post subject:
Also, on the php topic, now that i've finished my template, how do i include that in all of my other webpages. I suppose i could copy and paste but that seems even still, too inefficient. For example, after i finish my website and i notice a typo, it would be great to edit 1 file and fix the typo on all pages with that template.

thanks again

-tcsoccerman
Adam01 - Fri Oct 17, 2008 4:50 pm
Post subject:
try:
include(phpfile.php);
tcsoccerman - Fri Oct 17, 2008 4:53 pm
Post subject:
thanks! now, i couldn't get php on my computer and i don't have a host yet so, when you say try, do you mean that is the answer? well, i will just google it.
Adam01 - Fri Oct 17, 2008 5:52 pm
Post subject:
Why dont you use a free host?
Or iis with php (hard to set up)
x10hosting is a great php and mysql hoster.
What do I mean by try? It is a possible answer.
tcsoccerman - Fri Oct 17, 2008 6:27 pm
Post subject:
i guess you need cpanel for x10hosting
Adam01 - Fri Oct 17, 2008 7:13 pm
Post subject:
It comes with it.
tcsoccerman - Mon Nov 03, 2008 10:22 pm
Post subject:
Nevermind
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group