having a horrid time learning to -use- PHP

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
i'm trying to learn some php, my site is getting really cumbersome to manage, and gets worse as i add to it. i figure php would be great, but i cant seem to find any good places to learn. sure, there are tons of sites, phpnuke, php.net, phpbuilder, etc etc, i've been to them all and all the tutorials i find are horrible. they are either way too short and simplistic, or they are way too in depth and have a bunch of stuff i dont care about. i have been learning C lately, and have been involved with programming on and off for a couple years now. i KNOW what a variable is. i KNOW what a function is, a constant, etc etc. so i already know alot of php right off the bat. (its very C - like which is awesome since i'm learning C right now)

basically, all the pages of my site are exactly the same. same colors, same table layout, same everything. the only difference is the content in them. i figure i could have the main file, index.php, which calls 2 files, the main layout file, which contains formatting information and whatnot, and then the second file, which is determined by the variable passed to index.php, i.e. index.php?=games.html or just ?=games, whatever. it takes the content out of that file, and formats it all nicely based on the data in the formatting file, and then display it. i know alot of sites must use this type of technique, i am just having a HORRIBLE time finding good information on doing it. like i said, i've looked around at all the big php sites, been to google, i'm at my wits end and thats why i figured i'd ask here (as AT is mostly a hardware forum)

thanks for any info, and oh yeah, site is in the sig
 

Bleep

Diamond Member
Oct 9, 1999
3,972
0
0
I feel your pain!!! I have been trying to get a php bulletin board going for over a month working at it every day for 4 to 5 hours. There are no good tutorals out there anywhere I can find. I hope you find something.
Bleep
 

Hullboy

Member
Apr 18, 2001
172
0
0
Well, I have now come to the conclusion that books and online tutorials are very different animals.

If you are having trouble with a particular aspect of a language, or cannot get a specific and commonly used feature to work, online tutorials are great.

However, if you want to learn how to use a language well, books are the way to go.

I recently started learned php (couple of months ago) using the Wrox book beginning php. I had a programming background, so as you say, I know what a function is. I read the book cover to cover. The first 200 pages I read quickly, and most of it was telling me how to suck eggs. After that much of it wasn't new, but made me think twice. I expected it to be like this, so I didn't get impatient.

Having finished it I'm glad I read it, and now I can move forward with some confidence.

I guess what I'm saying is that sometimes you have to put the work in to get your foundations sturdy, and only then can you move onto bigger things. (I'm probably telling you how to suck eggs now! but sometimes what you don't want to hear is right for you! :Q)

Anyway, just my perspective on this based on the fact that I too went through a similar experience to what you are having now.

I hope this is some use!

ps nice colour scheme on your site, btw..................

 

RedRooster

Diamond Member
Sep 14, 2000
6,596
0
76
I agree with Hullboy, online tutorials are more geared towards people who know the language and just need a quick refresher on how to do a certain thing. Unfortunately, I'm not a teacher and have absolutely no teaching skills at all, so any "help" I give you would be useless as it probably wouldn't make sense. It's one of those things you can do, but can't explain real well.

Ideally, PHP is used with a database, as the data retrieval is made a ton easier, as well as it comes out in a manner that is easy to format. If you're trying to pull data out of simple files to create content for your site, that's most definately what's giving you all the grief then, as even seasoned vets would have a little trouble sorting it all out.

All I can suggest is to maybe grab yourself a textbook on the subject, one that just explains the simple parts of PHP cause once your get the syntax you're gonna be flying(with your C experience and knowledge of control structures).

Devshed.com has some decent tutorials if you haven't been there yet. If you have any specific questions, definately ask, lots of people around here have great PHP knowledge. Personally, I might not attempt creating your site layout as you have planned, however I'm uncomfortable working with file data, as I was only even taught to work with database connectivity as a source of data input.
 

joohang

Lifer
Oct 22, 2000
12,340
1
0


<< You could give ASP a try. VBscript is easier to learn in my opinion. >>


I suggest ASP.NET assuming that BingBongWongFooey has some OOP experience.

Ewww.. the only spaghetti code I dare to touch these days is DHTML.
 

cyberia

Platinum Member
Oct 22, 1999
2,535
0
0
Here is how I see BingBongWongFooey's problem and a possible solution:

Assuming you want to have a consistent look and feel in ALL of your pages (as stated in your "requirements/problem definition", all you need is ONE php script.

In this script, you will hard code the "look and feel" part (the green backgound, possibly a navigation bar on top and/or on the left, a banner on top etc.). You will add logic to this same php script that will pull data (content) from a database (mySQL, mSQL, MS SQL Server, MS Access depending on your web hosting provider's availability). It is in this database that you are going to store your content. The logic will be tied to which link was clicked on your main page and/or in the navigation bar.

I know that I am probably oversimplifying things. Depending on your document tree (subsections of your site), you will need a more complicated script/setup. However, I feel that the part you need to concentrate on is how to access a database using PHP. Maybe you should not try to become a PHP expert right now. Just learn how to apply PHP to solve specific tasks. This way you can become an expert during the process. Then, some time later, you can revisit your PHP books and polish your knowledge.

cyberia
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0


<< Here is how I see BingBongWongFooey's problem and a possible solution:

Assuming you want to have a consistent look and feel in ALL of your pages (as stated in your "requirements/problem definition", all you need is ONE php script.

In this script, you will hard code the "look and feel" part (the green backgound, possibly a navigation bar on top and/or on the left, a banner on top etc.). You will add logic to this same php script that will pull data (content) from a database (mySQL, mSQL, MS SQL Server, MS Access depending on your web hosting provider's availability). It is in this database that you are going to store your content. The logic will be tied to which link was clicked on your main page and/or in the navigation bar.

I know that I am probably oversimplifying things. Depending on your document tree (subsections of your site), you will need a more complicated script/setup. However, I feel that the part you need to concentrate on is how to access a database using PHP. Maybe you should not try to become a PHP expert right now. Just learn how to apply PHP to solve specific tasks. This way you can become an expert during the process. Then, some time later, you can revisit your PHP books and polish your knowledge.

cyberia
>>


yeah i am running apache and i'm sure i can set up MySQL without much trouble. i suppose i will just start off slow and take it from there. maybe i'm trying to go too fast.

coder1 and joohang: thanks for all the suggestions but i tend to avoid MS like the plague

thanks for everyone's input, it is very appreciated and i will check out all the links
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |