Page 1 of 1

Running my first PHP page.

Posted: Thu Nov 19, 2009 11:07 am
by madmenyo
Hi,

So I'm trying to to learn PHP, SQL and some more HTML by myself. I started with the basics and created 1 line of code that should work (because i copied it :D). Now the tutorial says i need a server with PHP on it to run it. So i got myself Wamp server 2.0 but i have totaly no clue how it works. Where do i upload my .PHP file to to let it work properly?

I looked for hours for a complete tutorial to get started with PHP but i get stuck on the moment to test my page. They just say upload it or get a server.... but to me that would be the hardest part as i have knowledge about programming and code but totaly no knowledge of servers, networks and mysql databases.

So i would like some help with setting up a server and running my little .PHP file. My 2nd goal would be to setup a mysql database to register users and my final goal would be to put down a simple game in the far future but it would be nice if i could add and do all that with the server so i don't have to learn stuff all over later on.

Thnx,

Re: Running my first PHP page.

Posted: Thu Nov 19, 2009 11:33 am
by iankent
If you're running Wamp you don't need to upload it as I assume Wamp is installed on the same computer you're writing your PHP code on?

If so, you just need to save your PHP file to the wwwroot directory of the Wamp server (afaik you can right click its icon and choose wwwroot from a menu). Once its in there, you then navigate to something like http://127.0.0.1/yourfile.php using your browser.

It should hopefully be that simple

Re: Running my first PHP page.

Posted: Thu Nov 19, 2009 11:50 am
by Gouveia
Since you're new to the language, I recommend downloading EasyPHP, which is as light as it can get and demands little, if not none, customization from the user to get up and running. It comes with PHP, Apache and a MySQL service so you can get started with your pages. I don't remember if you will get the MySQL service running. If that's the case, I also recommend you to download the MySQL Community Server, which will enable all the functionality from the database for your user registry thing.

Re: Running my first PHP page.

Posted: Thu Nov 19, 2009 12:12 pm
by madmenyo
Yeah that worked. thanks a lot, i knew it should be this simple lol :D.