Hamumu Software Hamumu Software Hamumu Software
Name
Password Register
Latest Journal update: May 12, 2013
Old 11-29-2007, 05:39 AM   #1
Knittel
Crazy Dude
 
Knittel's Avatar
 
Join Date: Jun 2007
Location: At a Dumb place
Posts: 1,177
Send a message via Skype™ to Knittel
Question PHP Question

I've a Question about PHP:
How do I make a input-field (like the Log-In field), and
How can I save the input in a variable, not in a SQL-file?

Thanks.
__________________
Frudelsoft Games
Knittel is offline   Reply With Quote
Old 11-29-2007, 05:42 AM   #2
Ryuinfinity
Banned
 
Ryuinfinity's Avatar
 
Join Date: Mar 2007
Location: Domefield Centre Mission: Defeat the Zirrons in Chyare Strait.
Posts: 1,045
Default Re: PHP Question

I don't know the second one, but you make text fields directly with HTML.
Ryuinfinity is offline   Reply With Quote
Old 11-29-2007, 05:44 AM   #3
Knittel
Crazy Dude
 
Knittel's Avatar
 
Join Date: Jun 2007
Location: At a Dumb place
Posts: 1,177
Send a message via Skype™ to Knittel
Default Re: PHP Question

Quote:
Originally Posted by Ryuinfinity View Post
I don't know the second one, but you make text fields directly with HTML.
Thanks, but this don't answer my Question.
Quote:
How do I make a input-field (like the Log-In field)...
__________________
Frudelsoft Games
Knittel is offline   Reply With Quote
Old 11-29-2007, 06:35 AM   #4
Jamul
Marshmallow Head
The Boss
 
Jamul's Avatar
 
Join Date: Jun 2003
Location: Anza, CA
Posts: 6,183
Default Re: PHP Question

Google "HTML Forms", there are lots of really basic tutorials on that. Then when the form is submitted, all form fields are in the form of $_GET["name"] or $_POST["name"] depending on whether your form was done via GET or POST (which you'll learn about in the tutorials!).
__________________
Jamul is offline   Reply With Quote
Old 11-29-2007, 07:15 AM   #5
Knittel
Crazy Dude
 
Knittel's Avatar
 
Join Date: Jun 2007
Location: At a Dumb place
Posts: 1,177
Send a message via Skype™ to Knittel
Default Re: PHP Question

Thanks.
__________________
Frudelsoft Games
Knittel is offline   Reply With Quote
Old 11-29-2007, 05:18 PM   #6
Julian
Is a ninja
 
Julian's Avatar
 
Join Date: Aug 2005
Location: http://www.nationstates.net/dordinal
Posts: 2,993
Send a message via MSN to Julian Send a message via Skype™ to Julian
Default Re: PHP Question

Quote:
Originally Posted by Jamul View Post
Google "HTML Forms", there are lots of really basic tutorials on that. Then when the form is submitted, all form fields are in the form of $_GET["name"] or $_POST["name"] depending on whether your form was done via GET or POST (which you'll learn about in the tutorials!).
There is also $_SESSION, $_COOKIE and probably many more, but you can access them all through $_REQUEST['name']
Julian is offline   Reply With Quote
Old 11-29-2007, 05:35 PM   #7
Jamul
Marshmallow Head
The Boss
 
Jamul's Avatar
 
Join Date: Jun 2003
Location: Anza, CA
Posts: 6,183
Default Re: PHP Question

Forms don't put things into a session or cookies - those are done separately.
__________________
Jamul is offline   Reply With Quote
Old 11-30-2007, 05:41 AM   #8
Ryuinfinity
Banned
 
Ryuinfinity's Avatar
 
Join Date: Mar 2007
Location: Domefield Centre Mission: Defeat the Zirrons in Chyare Strait.
Posts: 1,045
Default Re: PHP Question

Cookies are made automatically. Making your own cookies is usually dicey.
Ryuinfinity is offline   Reply With Quote
Old 11-30-2007, 06:05 AM   #9
Julian
Is a ninja
 
Julian's Avatar
 
Join Date: Aug 2005
Location: http://www.nationstates.net/dordinal
Posts: 2,993
Send a message via MSN to Julian Send a message via Skype™ to Julian
Default Re: PHP Question

Quote:
Originally Posted by Ryuinfinity View Post
Cookies are made automatically. Making your own cookies is usually dicey.
Cookies are NOT made automatically -- you need to make your own.
Julian is offline   Reply With Quote
Old 11-30-2007, 07:10 AM   #10
Ryuinfinity
Banned
 
Ryuinfinity's Avatar
 
Join Date: Mar 2007
Location: Domefield Centre Mission: Defeat the Zirrons in Chyare Strait.
Posts: 1,045
Default Re: PHP Question

Um... No. A lot of things automatically make a cookie. (In Firefox at least)
Ryuinfinity is offline   Reply With Quote
Old 11-30-2007, 08:46 AM   #11
ElMikkino
Certified Bunnay Agent
 
ElMikkino's Avatar
 
Join Date: Jul 2007
Location: Not Kansas
Posts: 1,652
Default Re: PHP Question

Mmmmmmmmm.....cookies....
__________________
When in Rome, drink Romenade.
Toronto Island is the entertainment.- Translation Party
This won’t appear 3D to you unless you cut very precise grooves in your computer monitor. We don’t recommend doing that. - GamesRadar
Humility is the mark of a true warrior/cool person
.
ElMikkino is offline   Reply With Quote
Old 11-30-2007, 12:05 PM   #12
Mr.Onion
Evil, random-voting vegetable
 
Mr.Onion's Avatar
 
Join Date: Mar 2005
Location: Down at the shore where there's no-one vacationing.
Posts: 4,860
Default Re: PHP Question

Quote:
Originally Posted by Ryuinfinity View Post
Um... No. A lot of things automatically make a cookie. (In Firefox at least)
Like? As far as I know, nothing makes a cookie automaticly.
__________________
Mr.Onion is offline   Reply With Quote
Old 11-30-2007, 02:01 PM   #13
Ryuinfinity
Banned
 
Ryuinfinity's Avatar
 
Join Date: Mar 2007
Location: Domefield Centre Mission: Defeat the Zirrons in Chyare Strait.
Posts: 1,045
Default Re: PHP Question

Any kind of thing where you have to load scripts. It creates a cookie to run the scripts automatically next time to be quicker. It can also store stylesheets as cookies.
Ryuinfinity is offline   Reply With Quote
Old 11-30-2007, 02:19 PM   #14
Mr.Onion
Evil, random-voting vegetable
 
Mr.Onion's Avatar
 
Join Date: Mar 2005
Location: Down at the shore where there's no-one vacationing.
Posts: 4,860
Default Re: PHP Question

Are you confusing cookies, which scripts use to store data, with the cache, where the browser stores data so that it can be retrieved faster next time?
__________________
Mr.Onion is offline   Reply With Quote
Old 11-30-2007, 02:21 PM   #15
Jamul
Marshmallow Head
The Boss
 
Jamul's Avatar
 
Join Date: Jun 2003
Location: Anza, CA
Posts: 6,183
Default Re: PHP Question

You're confusing cookies with cached pages. Any page you visit is saved on your computer so it can load from there next time (with varying degrees of getting it off the web in the future, depending on your settings). Cookies are little bits of data that hold your info, like your name and password on a forum. A webpage can read the cookies to use their information as needed. Cookies have to be explicitly set by a webpage to exist.
__________________
Jamul is offline   Reply With Quote
Old 11-30-2007, 02:28 PM   #16
Ryuinfinity
Banned
 
Ryuinfinity's Avatar
 
Join Date: Mar 2007
Location: Domefield Centre Mission: Defeat the Zirrons in Chyare Strait.
Posts: 1,045
Default Re: PHP Question

Really? The HTML and Javascript tutorial site I use calls those cookies.
Ryuinfinity is offline   Reply With Quote
Old 11-30-2007, 05:38 PM   #17
SpaceManiac
Veteran Programmer
 
SpaceManiac's Avatar
 
Join Date: Oct 2007
Location: Elsewhere
Posts: 2,880
Send a message via Skype™ to SpaceManiac
Default Re: PHP Question

Huh. That's weird. What tutorial are you using? I learned from www.webmonkey.com!
SpaceManiac is offline   Reply With Quote
Old 12-03-2007, 02:51 PM   #18
Ryuinfinity
Banned
 
Ryuinfinity's Avatar
 
Join Date: Mar 2007
Location: Domefield Centre Mission: Defeat the Zirrons in Chyare Strait.
Posts: 1,045
Default Re: PHP Question

I use W3schools.

Last edited by Ryuinfinity; 12-03-2007 at 02:52 PM.
Ryuinfinity is offline   Reply With Quote
Old 12-04-2007, 07:42 AM   #19
Knittel
Crazy Dude
 
Knittel's Avatar
 
Join Date: Jun 2007
Location: At a Dumb place
Posts: 1,177
Send a message via Skype™ to Knittel
Default Re: PHP Question

Thanks, for all those answers.

Quote:
Originally Posted by SpaceManiac View Post
Huh. That's weird. What tutorial are you using? I learned from www.webmonkey.com!
Quote:
Originally Posted by Ryuinfinity View Post
I use W3schools.
That's nice, but I will never learn from your webpages, it's already difficult to learn PHP. I use a German website to learn it.
__________________
Frudelsoft Games

Last edited by Knittel; 12-04-2007 at 07:42 AM.
Knittel is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Site Map
Copyright 2013, Hamumu Software