Mythic Fr0st Posted December 1, 2006 Share Posted December 1, 2006 I am wanting to learn PHP ( For making an online game I want )Sadly, I dunno how to GET it working... I've downloaded php, but I dunno what i use? is there an editor for it? do you view it in your browser, use notepad? i've got no idea O_OCan anyone help me with this, kinda a big set back lolz Quote Link to comment Share on other sites More sharing options...
projectshifter Posted December 1, 2006 Share Posted December 1, 2006 I think you've got the wrong idea about this. GET and POST are types of variables sent through a form usually. If you see blah.php?one=this&two=that&three=woah it is a url that has GET variables in it. The ? after the filename is the query string (or where the variables start basically). one=this, two=that, three=woah are the values of these variables. With register_globals ON you could do echo $one and see 'this', but this is poor coding so it's better to use $_GET['one'] ($_GET['var'] is how you access GET variables), and then you would have your value there. Keep in mind these are easy to forge, so not always the best, and you want to put in some extra data. POST variables are accessed via $_POST, or you can get both via $_REQUEST. Both can be forged without too much of a problem, so watch out! Quote Link to comment Share on other sites More sharing options...
fert Posted December 1, 2006 Share Posted December 1, 2006 to get it working you need to upload to a server with PHP enabled. Quote Link to comment Share on other sites More sharing options...
Azu Posted December 1, 2006 Share Posted December 1, 2006 [quote author=Mythic Fr0st link=topic=116939.msg476744#msg476744 date=1164947815]I am wanting to learn PHP ( For making an online game I want )Sadly, I dunno how to GET it working... I've downloaded php, but I dunno what i use? is there an editor for it? do you view it in your browser, use notepad? i've got no idea O_OCan anyone help me with this, kinda a big set back lol[/quote]I think notepad is pretty good for it.To use php, just put"<? php//stuff?>" in your file.. and make sure it's name ends in .php.. all of the php stuff is done in the server. It will send normal html to the browser. Try putting echo"something"; in it for a start :P Here is a [url=http://php.about.com/od/phpfunctions/PHP_Functions.htm]list[/url] of some PHP commands with descriptions of what they do :) And people viewing your website won't be able to see the actuall php stuff on your page, they will just see the html that is sent to them. Quote Link to comment Share on other sites More sharing options...
Mythic Fr0st Posted December 1, 2006 Author Share Posted December 1, 2006 Ok, thanks, so how do I get a server, ( i've tried downloading apache 2.2.3, but it confused me a little )Im only 15 lolz, with little programming experience, IF I downloaded Apache again ( installing it ), how would I upload the PHP to it? ?? or would I like haev to find a hosting service ( any ) and typing the PHP in there??? ??? ??? Quote Link to comment Share on other sites More sharing options...
projectshifter Posted December 1, 2006 Share Posted December 1, 2006 [quote author=Mythic Fr0st link=topic=116939.msg476752#msg476752 date=1164948499]Ok, thanks, so how do I get a server, ( i've tried downloading apache 2.2.3, but it confused me a little )Im only 15 lol, with little programming experience, IF I downloaded Apache again ( installing it ), how would I upload the PHP to it? ?? or would I like haev to find a hosting service ( any ) and typing the PHP in there??? ??? ??? [/quote]You can find a hosting service with PHP, it's been standard for a while, prolinkhosting.com does $10 for a year of unlimited transfer and storage, and a domain is like $9 from godaddy, or you can get easyphp from easyphp.org and it basically puts apache, php and mysql on your computer for you so you can work there. Quote Link to comment Share on other sites More sharing options...
Mythic Fr0st Posted December 1, 2006 Author Share Posted December 1, 2006 I see, I have had all three of them (MySQL, Apache 2.2.3, and PHP) on them I think I found them on easy.org, or something like that, However, I didnt get how I could do the stuff?I tried typing PHP in MySQL I got errors O_O so I figured thats not right, and I tried writing PHP in the PHP program thingy, but that wasnt right either, I've always struggled learning PHP, and given up, cus I cant figure out how to err find the right things, and find the right "Place" to begin doing whatever I wanna do- Basically, im saying, how can I work on my computer with all 3 of them ( What do I do ??? ) Quote Link to comment Share on other sites More sharing options...
projectshifter Posted December 1, 2006 Share Posted December 1, 2006 [quote author=Mythic Fr0st link=topic=116939.msg476759#msg476759 date=1164948822]I see, I have had all three of them (MySQL, Apache 2.2.3, and PHP) on them I think I found them on easy.org, or something like that, However, I didnt get how I could do the stuff?I tried typing PHP in MySQL I got errors O_O so I figured thats not right, and I tried writing PHP in the PHP program thingy, but that wasnt right either, I've always struggled learning PHP, and given up, cus I cant figure out how to err find the right things, and find the right "Place" to begin doing whatever I wanna do- Basically, im saying, how can I work on my computer with all 3 of them ( What do I do ??? )[/quote]You've got to find where apache is reading the files from, and save your files in there. All php code needs to be between <?php and ?> braces, and your files will need to be saved as .php (unless you want to edit your apache config, but that's pointless at this stage). Then instead of opening it up from Open File in your browser, you type in something like http://localhost while apache is running Quote Link to comment Share on other sites More sharing options...
Mythic Fr0st Posted December 1, 2006 Author Share Posted December 1, 2006 Ok ty, im trying that now, thanks very much all! Quote Link to comment Share on other sites More sharing options...
projectshifter Posted December 1, 2006 Share Posted December 1, 2006 No worries, let us know how it goes :) The big thing a lot of new people run into is that if you're saving in notepad, you have to make sure you go to "all files" when you save otherwise you'll get file.php.txt, which is NOT going to work. That and make sure you are putting it in the proper directory that apache is looking for. Quote Link to comment Share on other sites More sharing options...
Mythic Fr0st Posted December 1, 2006 Author Share Posted December 1, 2006 Its going great, I linked it to a new SITE WOOTI dont get that problem, Its a .php file, and I right click, and open with notepad, ^_^WOOT< About to post something big question confusy me lol ( WOO )Thanks so much!I click submit, and it GOES TO A new page WOO Quote Link to comment Share on other sites More sharing options...
projectshifter Posted December 1, 2006 Share Posted December 1, 2006 Glad you got it all going :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.