Need Suggestions on Teaching Myself PHP
07-31-2009, 06:08 AM
|
Need Suggestions on Teaching Myself PHP
|
Posts: 54
|
I have gotten to where I am today by teaching myself PHP. I've been making
little scripts that do strange (but utterly worthless) tasks such as generating
and preforming a random task or using a flat-file array to fetch some data.
Lately I have been running out of ideas that will actually require me to learn
something, because as many of you know doing one task different ways
doesn't do much.
I need some suggestions on "tools" to make that are mainly in PHP, nothing
really simple but nothing advanced either, I am just a beginner. -KellyAX
Last edited by KellyAX; 07-31-2009 at 06:10 AM..
|
|
|
|
07-31-2009, 10:41 AM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 79
Name: Ed Barnett
|
Best bet is to build yourself a simple blog (which is a glorified diary). You'll need to use PHP alongside a database (such as MySQL) which will mean learning SQL (structured query language). The two go hand in hand more often than not so it's something useful.
Other than that, just start making different types of websites. Find what you like and try to replicate it! I learnt by doing work for clients (learning on the fly). I found it's the best way to learn - and it's still how I learn new stuff now!
|
|
|
|
07-31-2009, 01:03 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 54
|
Thanks but is a database really necessary? I was thinking of something that posted and read files.
|
|
|
|
07-31-2009, 01:59 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
Here's a puzzle that helped me when I was starting out teaching myself:
Put a bunch of images in a folder. Then, make a page which picks one image every week to display on a certain page of your website. A different image will be displayed each week. Or, you could alternate and display a different image each hour, day, or whatever.
I did it without a database, since I hadn't gotten that far in learning.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
07-31-2009, 11:41 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 54
|
Quote:
Originally Posted by wayfarer07
Here's a puzzle that helped me when I was starting out teaching myself:
Put a bunch of images in a folder. Then, make a page which picks one image every week to display on a certain page of your website. A different image will be displayed each week. Or, you could alternate and display a different image each hour, day, or whatever.
I did it without a database, since I hadn't gotten that far in learning.
|
My friend had already challenged me in this exact topic except he wanted me to change the image after every twelve hours, I did this using (first) server time then after I used user time.
|
|
|
|
08-01-2009, 03:57 AM
|
Hi everybody
|
Posts: 3
Name: gomathi
|
Hi everybody,
I am new to this site.I hope this site will help me to understand quickly
I would like to say "hi" to all members Welcome to the forum.
|
|
|
|
08-01-2009, 05:04 AM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 14
|
I subscribe to EdB's point of view. Learn on the fly by making websites for yourself.
php is pointless without data and the best way to store data is by using databases.
|
|
|
|
08-01-2009, 09:37 AM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 54
|
Quote:
Originally Posted by netingredient
PHP is pointless without data and the best way to store data is by using databases.
|
I strongly disagree, PHP wasn't invented to store data and that isn't its main use even today.
|
|
|
|
08-01-2009, 09:56 AM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
Well, PHP isn't meant to store data, but MySQL is. You're going to have to cross that bridge eventually. Almost every single website and application I build these days involves a MySQL database in addition to PHP.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
08-01-2009, 02:56 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 242
|
If I were you I would just get a book that teaches you all of the syntax and all of that, and it will give you ideas of what you could possibly make, along with showing you how to make some of them.
The PHP book that I am currently reading is: "PHP: The Complete Reference" By: Steven Holzner.
I new most of the stuff already, but it teaches you how to make your own blogging software, how to install mySQL, Apache, and PHP 5.0, how to use PHP and mySQL together, and much more.
I just got it at the Library.
|
|
|
|
08-01-2009, 03:16 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 14
|
Quote:
Originally Posted by KellyAX
I strongly disagree, PHP wasn't invented to store data and that isn't its main use even today.
|
Not for storing data.. but for using it. My point is that php use data (information, whatever) in any operation. Whats the point of an empty variable, array, etc.. at some point some kind of information will fill these.. data that came from somewhere, form, file, db, etc.
So imo, the best way to store, use data is by using a database rather than files.
|
|
|
|
08-01-2009, 05:09 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 54
|
Quote:
Originally Posted by netingredient
Not for storing data.. but for using it. My point is that php use data (information, whatever) in any operation. Whats the point of an empty variable, array, etc.. at some point some kind of information will fill these.. data that came from somewhere, form, file, db, etc.
So imo, the best way to store, use data is by using a database rather than files.
|
Again, you can set these variables in the PHP file or in another file, you do not need a database to get information out of a file.
|
|
|
|
08-01-2009, 05:51 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
Yes, but a file is much less secure than a database, and has very limited capabilities for organizing and retrieving data in a powerful fashion. However, it is important to know how the file system works in PHP, since for small cases using a flat file is faster than retrieving from the database.
Once your start using a database to store and retrieve data, you won't want to do it any other way. I'll admit it can be intimidating at first, since it's a whole other language paradigm aside from PHP, but learning the basics is really not that hard.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
08-01-2009, 06:09 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 2,162
Name: ...
Location: ...
|
Quote:
Originally Posted by wayfarer07
Here's a puzzle that helped me when I was starting out teaching myself:
Put a bunch of images in a folder. Then, make a page which picks one image every week to display on a certain page of your website. A different image will be displayed each week. Or, you could alternate and display a different image each hour, day, or whatever.
I did it without a database, since I hadn't gotten that far in learning.
|
Yep, right on! That's an excellent idea for starters. That's makes alot of sense too because you can start from displaying just one image on a page to displaying an image on a particular day, week month, year, or even during different parts of the day, ex: 12:00am display good morning image, 12:00pm display good afternoon image, 5:00pm display good evening image, make sure the images stay displayed too until their duration is actually 'up'.
AND, if that's not challenging enough (which I do believe it is) you can try doing something via mysql db which even has a 'backend' interface where you can set 'rotating' or weight features. There used to be a script called Banners Pro by a guy named David Parker I believe was his name, and it was sweet. Lot's of features in the back end and everything. Sorry to drag on, but I had to get that part out.
Good luck anyway
-Brian
__________________
Made2Own
|
|
|
|
08-01-2009, 11:34 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 54
|
I am not asking on how to use MySQL, I already know how to do this. I need script ideas that use PHP and only PHP.
|
|
|
|
08-02-2009, 02:25 AM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 89
Name: Trey
|
Quote:
Originally Posted by KellyAX
I am not asking on how to use MySQL, I already know how to do this. I need script ideas that use PHP and only PHP.
|
Well, you could try what I'm doing right now. I'm making a backend that will be used in all the websites I develop in the future. I got browscap.ini up and running. It's a nice tool to have; you should try setting it up.
Anyway, if you're curious, here's the features of the backend that you would need to have to keep up with me:
* doctype generator
* favicon code generator
* ability to take a template and insert content into it
* ability to use the output from get_browser()
* many other little functions to speed up the development process. What functions you would have are based on your personal preference.
I've completely re-worked the code twice, trying to achieve the cleanest and most efficient code that I could make. You can hit up the website for it in the second link in my sig (although the website isn't technically "up" yet...)
HTH,
-Trey
__________________
Decatur-Austin Robotics Coalition (DARC) - Please login or register to view this content. Registration is FREE
|
|
|
|
08-02-2009, 03:16 AM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 2
Location: Canada eh!
|
Best way to learn is by making mistakes
Install PHP/MySQL/Apache on your computer (Search for XAMPP), it gives you everything you need to run your own web server.
The take open source and install and play. Try Wordpress to start off with.
Tizag has great starter PHP tutorial - have fun! 
|
|
|
|
08-02-2009, 06:09 AM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 54
|
Quote:
Originally Posted by AntonBC
Best way to learn is by making mistakes
Install PHP/MySQL/Apache on your computer (Search for XAMPP), it gives you everything you need to run your own web server.
The take open source and install and play. Try Wordpress to start off with.
Tizag has great starter PHP tutorial - have fun! 
|
XAMPP is so dangerous I don't even want to go into that; I have PHP 5 and Apache installed anyways,
|
|
|
|
08-02-2009, 10:03 AM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
Here's a puzzle:
Place an entire mini-site into an upper level directory, so that the entire site is located in something like this: /experiment/development/
Now, make a function that places its value into a constant, which records what the base path is (relative to the public root, not the server).
So your function should be able to automatically output /experiment/development/ if it is placed into that directory. This is not as easy as it seems. You'll learn a lot about path functions and super-globals along the way. Also, if you have an unusual server, you'll see that there is sometimes a difference between a path generated by $_SERVER["DOCUMENT_ROOT"] and dirname(__FILE__).... just a clue, at least in relation to how I handled it.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
08-02-2009, 04:51 PM
|
Re: Need Suggestions on Teaching Myself PHP
|
Posts: 3
Name: Shabz
|
The best way i learned is from trail and error. You try something, it dont work then you research find what you done wrong then fix it. Through out time you will pick up new skills and become better at coding no matter what language you want to program in.
__________________
PHP / MYSQL Coder - Contact me for prices/rates.
|
|
|
|
|
« Reply to Need Suggestions on Teaching Myself PHP
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|