Author |
Message |
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: 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 https://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? |
|
Back to top |
|
|
Mine GO BOOM Hunch Hunch What What
Age:40 Gender: Joined: Aug 01 2002 Posts: 3614 Location: Las Vegas Offline
|
Posted: Mon Oct 13, 2008 4:37 pm Post subject: |
|
|
|
|
Query string. And in PHP, it would be $_GET or $_REQUEST, not session. |
|
Back to top |
|
|
k0zy Server Help Squatter
Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
Posted: 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 _________________ It's a shark! Oh my god! Unbelievable! |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Mon Oct 13, 2008 4:51 pm Post subject: |
|
|
|
|
Thanks for the quick replies, very clear now. |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Mon Oct 13, 2008 8:03 pm Post subject: |
|
|
|
|
Cool... I just learned some php too _________________ (Insert a bunch of dead links here) |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: 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 |
|
Back to top |
|
|
Adam01 Novice
Joined: Oct 03 2008 Posts: 51 Offline
|
Posted: Fri Oct 17, 2008 4:50 pm Post subject: |
|
|
|
|
try:
include(phpfile.php); |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: 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. |
|
Back to top |
|
|
Adam01 Novice
Joined: Oct 03 2008 Posts: 51 Offline
|
Posted: 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. |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Fri Oct 17, 2008 6:27 pm Post subject: |
|
|
|
|
i guess you need cpanel for x10hosting |
|
Back to top |
|
|
Adam01 Novice
Joined: Oct 03 2008 Posts: 51 Offline
|
Posted: Fri Oct 17, 2008 7:13 pm Post subject: |
|
|
|
|
It comes with it. |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Mon Nov 03, 2008 10:22 pm Post subject: |
|
|
|
|
Nevermind |
|
Back to top |
|
|
|