View Full Version : I want to learn php...any tips, advice?
yorgo
04-20-2004, 05:39 PM
Hey everyone,
Just like the title to this thread suggests...how can I learn php and mysql so that I can 'jazz' up my sites, especially for refershing the page and making new banners and text links show up where the old ones were?
I would fist learn the basics of site building before trying to learn how to script sites.
yorgo
04-20-2004, 05:46 PM
So what your saying then is that I still have a ways to go?
Most of the stuff that I build, like free sites, are just straight very simple html.
Unless you are planing on becoming a programmer or something like that you need to learn…
How to sell.
How to get traffic
Where is get traffic
How to build sites that get accepted
What niches you are good at selling
What sponsors convert well for your traffic
Etc.
For what php, mysql, cgi, etc. that I do use I use pre-made scripts that I then have to learn how to use, but I don't need to know how to write them.
yorgo
04-20-2004, 06:11 PM
I feel I am at the point where I am VERY close to creating pretty good sites. I am still trying to find my specific niches.
Lately, I have been getting traffic like crazy, but not so many sales.
xfalmp
04-20-2004, 08:22 PM
If you want to learn PHP, read a small tutorial and start programming something you want. The manual is your friend.
And I really meant it, if you want to learn you need to try programming something. At least that's what works for me. :)
yorgo
04-20-2004, 08:34 PM
You make it sound easy. I have been at php.net. There are a number of actions you must take before you can actually begin programming in php.
You have to download a php program. Then you have to fiddle around with mySQL, etc.
I don't think its that difficult but there are a number of 'things' you have to do first.
I still have to figure out what those things are first.
And I have to practice as well
|newbie|
venturi
04-21-2004, 12:02 AM
#1) Go to Amazon.com and buy books - not tutorials as they all suck. Buy reference manuals.
#2) Bookmark php.net
#3) Go to http://www.scriptschool.com/php/ and take this free course.
If all else fails, just hire me. |buddy|
xfalmp
04-21-2004, 02:37 AM
Originally posted by yorgo
You make it sound easy. I have been at php.net. There are a number of actions you must take before you can actually begin programming in php.
You have to download a php program. Then you have to fiddle around with mySQL, etc.
I don't think its that difficult but there are a number of 'things' you have to do first.
I still have to figure out what those things are first.
And I have to practice as well
|newbie|
I know it's not easy but once you read a good tutorial and know the basics, you'll know what to do and the manual will show you how. You don't need to work with MySQL at first if you don't want, you can use text files (I doubt your first "project" will need a MySQL solution). Actually, you don't even need to install PHP and Apache if you don't want, but you'll have to use your remote server to test things. And that's why people usually install things at their machine, testing things locally is waaay faster. :)
Originally posted by yorgo
You make it sound easy.....
Here's something easy you can do with php...
It's simple, but useful...
Create an html file called "banner.html" with your banner code in it like this
<center>
<a href="http://sponsor.com/">
<img src="images/banner.jpg" width="468" height="80" border="0"><br>
<b><font face="verdana">Insert sales text here</font></b></a>
</center>
Upload it to your server and check that it's there.
Copy an existing html page and change the extension to ".php" instead of ".html"
(NB: You can set up your server to read php from html pages)
Amongst the html of this page add these three lines of php code...
<?php
require("banner.html");
?>
and when you view the new .php page on the server, you will see that the banner.html has been pulled in (included)within the php page. The php "engine" on your server has executed the command to include the banner info, before the page is served to the browser.
This is useful because you can link up all your sites to that single banner.html, and then if you wanna change sponsor for any reason, you only need to change the banner.html and ALL your sites will change sponsor because they are being served from one central point, in the same way you can do this with SSI.
yorgo
04-21-2004, 10:56 AM
Thanks urb...but what if you want to have the banner "rotate" from a series of say 10 banners?
I've noticed when I press "refresh" on some of the bigger or more sophisticated sites, diffrent banners and link codes show up.
Is that php script more complex?
|waves|
Originally posted by yorgo
Is that php script more complex?
Yes, but there's no need to write your own code when someone has already done it for you. This will do the trick http://phpadsnew.com/two/ :)
yorgo
04-21-2004, 11:14 AM
Thanks for the hot tip, urb!
You have been most helpful!
|waves|
vangend
04-21-2004, 05:04 PM
I found a book at Amazon called php4 Developer's guide - used $2-97. And I found it good for beginning with php.
4Pics
04-21-2004, 06:18 PM
The best tip, hotscripts.com ... find a script that is something simple that you want to do, d/l a few of them like it and get them working. Then try to make changes to it.
venturi
04-22-2004, 03:18 AM
Okay, here's the deal...
Learning PHP is pretty easy. Learning to be a PROGRAMMER is not. Sure, you can learn PHP in a matter of a couple weeks if you are reasonably intelligent. But you will spend YEARS learning how to be a true PROGRAMMER unless you have a competent mentor (like myself). I have been programming for well over 20 years. I've forgotten more languages than most people will ever learn. What this gave me is an innate knowledge of programming and analysis so that I can provide an efficient solution for my clients as quickly as possible.
All the code hacks out there that have a few years of college and some programming classes don't know shit. They've only lived in the puristic world of "everything works the first time" and have no experience getting their asses handed to them because one line of code caused them late night pager and/or phone calls to fix something that "should have worked".
Can you learn php basically overnight? yeah, if you're a quick reader. Can you become a competent programmer overnight? NO.
ok, stepping off the soap box (I'm blaming Cleo) . :)
Originally posted by venturi
Can you learn php basically overnight? yeah, if you're a quick reader. Can you become a competent programmer overnight? NO.
Agreed. :)
Anyone can cook, but it takes years to become a good chef.
Mishi
04-22-2004, 04:38 AM
Originally posted by urb
Agreed. :)
Anyone can cook, but it takes years to become a good chef.
So well said, I'm totally abandoning my post...and that's damned rare. ;)
Surfn
04-22-2004, 04:41 AM
Originally posted by urb
Agreed. :)
Anyone can cook, but it takes years to become a good chef. What's for breakfast? :D
Mishi :)
Originally posted by Surfn
What's for breakfast? :D
You're late Surfn... your breakfast is in the cgi-bin!!
yorgo
04-22-2004, 11:51 AM
Thanks a lot guys!
I will definitely take into consideration EVERYTHING that has been posted. Being a determined individual by nature, will help me get to where I want to be.
As far as being a 'bonafide' programmer, that won't happen overnight, this I knew and realized before all the posts that were posted by all of you.
A webmaster friend of mine has lent me a book entitled 'begining PHP4,' a wrox programmer to programmer publication.
I've begun reading it. There are mantopics that are covered in this publication, and book is almost 800 pages!!
Thanks for all the kind gestures, bits of information, and advice/wisdom.
I am going to continue building and submitting free sites, as usual and as time permits. Being only a part-time webmaster for now who has tasted modest success in my first 4 months, I feel any/all information I acquire will only be for MY benefit.
Regards,
Pornrex
HarryM
04-25-2004, 11:31 AM
Its not php but this is a very easy to use banner rotator, it displays a html snippet randomly http://www.focalmedia.net/htmlrotate.html and its for free
yorgo
04-27-2004, 01:54 PM
Thanks Harry.
Any info on improving the quality of sites is greatly appreciated.
|bananna|
jazzcat
05-03-2004, 05:31 PM
Not ideal for everyone but i run apache, mysql and php locally with my machine set up as a server. That way i can muck about with php and mysql dbases to my hearts content before i put stuff up live. There are plenty of places where you can get hold of php scripts or snippets of code for free that can often help you out.
Rorschach
05-20-2004, 03:50 AM
By far the best tutorial I have found for PHP is the 16 part course at http://www.scriptschool.com/ - it is an excellent and very concise foundation course in php and web scripting in general.
darnit
05-21-2004, 10:17 PM
Just wanted to give you a vote of encouragement. I took it apon myself to learn php as well. Ive been coding html / javascript etc for years and what i have found works best is the same thing i did to learn html.
Simply find scripts and tweak them, start with simple scripts and once you learn what they do and how to modify them then move to more advanced ones and start the process over.
After a couple weeks i have already written my own custom banner rotator script like you want to do, so hang in there...
Magnum
05-24-2004, 02:35 AM
Another School.
http://www.adultnetsurprise.com/learningzone/php/php_index.html
Magnum.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.