Blogs get indexed by the search engines faster than websites.
Websites tend to just “wait” for the search engines to come visit them.
Blogs tend to “alert” search engines that there is a new entry on the blog.
Val Zubiri![]()
![]()
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
When I finally began to understand PHP and MySQL, I realized that a lot of people who would also like to learn PHP and MySQL do not need to go through the same, or worse, difficult ordeal that I went through.
There were times when I had to go to Borders Bookstore, hang out in the Computers section, and wait for a person to pick up a PHP or MySQL book. I would then approach them and ask them if they can sold my PHP/MySQL problem.
Online, I have also looked for member profiles which have the keywords PHP and MySQL mentioned. I would email them my questions, and I got answers back most of the time.
By doing this, and also mentioning in my own profile that I liked PHP and MySQL, I also encountered people online who needed help.
The best way I was able to teach anyone PHP and MySQL, later on, was to ask them to first buy the book that I also already have. If my chat buddies got stumped, I would refer them to the book page, and proceed from there.
Val Zubiri![]()
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
CASE: The Client wants the website to have a login page.
What this means is that your life just got more complicated.
You will need the following pages:
and: A database of username, password and email
The Registration Page
Should check the database so that the username and the email are not repeated (be unique).
The Login Page
Should either use sessions or cookies which the Logout Page clears
The Forgot Username / Password Page
Should have the PHP mail() function. You might also consider making the forgot password email look better than just having regular text. (You will need to know about html headers in the mail function.)
![]()
Actually, this analysis continues…
The client surprises you with such a request, but he or she has valid reasons for such a request. Chances are you would have to make more tables and more columns in the database.
Then you get more creative…
Elements the Registrant would not know your are recording
It would also not hurt to have a column that would tell the date the person registered. It might not hurt to know when the member last logged in. It might not hurt to know how many times the website was used by the member. It might also not hurt to know the IP address of the registrant.
Elements the Registrant would know your are recording
During the registration process, you might want to know age, city, interests, sex, etc. Whatever you do, don’t scare off the registrant by asking too many questions.
Val Zubiri
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
Besides yourself, your computer and an internet connection, you need two things.
A Dotcom Name and a Web Host.
Here is the most important tip I can give you…
Do not use the same company for both registering your dotcom (your domain name) and hosting your web pages.
The company will do everything in its power, and creatively too, to prevent you from conveniently switching to other companies that are much cheaper than the one you are using. You will be penalized for making changes. You will be penalized for you disloyalty. You will have high blood pressure and headaches.
For your dotcom, or “domain name,” try www.godaddy.com.
For your web server, check out www.bluehost.com. Compare what they are offering with other companies you may have heard of. I highly recommend Bluehost.
Actually, you need to coordinate the above two elements. You need to check www.godaddy.com that your domain name is not yet owned and used by someone else. This will just take a few seconds.
Once you have decided that you want a certain domain name that is still available, you have to first pay the web server for the hosting package you want. You will then get an email confirming that you have purchased a hosting package, and you will also see a phrase like “NS1.BLUEHOST.COM” and “NS2.BLUEHOST.COM” (if it’s Bluehost that you paid).
Go then to a domain registering company like Godaddy.com, and pay for the domain name you wanted to own. You will then be asked what two main nameservers you want to use. Type in the phrases that look like “NS1.BLUEHOST.COM” and “NS2.BLUEHOST.COM”
Wait a half day to one or two days. Open your browser, type in your dotcom name and see if your dotcom is operational and ready to be edited!
Domain Names - This is your “dotcom” name. You pay godaddy to tell the entire world, that yourname.com exists, and that no one else can use it anymore. After you register (and pay) for the domain name, you will need to wait up to a day or two (lately, sometimes it’s less than a day) for the registration to be complete. Companies like Godaddy.com tell the entire world which nameservers to go to in order to see your files.
Web Hosting Companies - Web hosting companies are where your web pages are stored. Your own computer could not be a host, because you turn it off once in a while, and your internet address ("IP address") usually changes everytime you log back on whatever internet service you have. Web hosting companies are on 24 hours a day, 365 days a year. They also have more permanent IP addresses. There are two nameservers, so that if one of the servers is under repair, the other server will continue to serve your pages to your website’s visitors.
![]()
Here is another reason why you should use two different companies…
The company where you register your domain charges on a yearly basis, sometimes longer.
The company who holds your web pages, the web host, might charge you a monthly hosting fee.
If you fail to pay your web host the monthly fee, for whatever reason, they will have the power to suspend your most treasured dotcom name, that took you days or even months to think about and decide on.
At least, if you registered your name with a separate company, you will have the option to use a different hosting company without having to be forced to pay your past dues from the previous hosting company.
![]()
What you need next is an HTML editor. Dreamweaver or any other product is okay. Dreamweaver can be quite complicated for a lot of people, but I would highly recommend easing into Dreamweaver as soon as you get familiar with the simpler programs.
Obviously, you also need internet connection.
Finally, you need a browser.
![]()
Next, when you get to making your web pages, you must constantly check if you coded correctly. The way to do this is to constantly save your web pages ("upload") to your server or hosting company as you edit - your html editor should have the capability of uploading to your hosting company as your click save.
At the same time, you also have your browser open, and you constantly should also call your page to see if you are progressing correctly.
You’re just a beginner, so one browser should suffice. However, you should also be aware that browsers also differ in the way they show pages. As your designs and/or coding get more complicated, you will want to use a few browsers to check if they are each showing your page the way you want it seen.
(I’m switching between similar terms just for the heck.)
Val Zubiri
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
This is how I look for my errors:
My code has a hierarchy of curly brackets: { and }
I do my best to know which opening bracket pairs with which closing bracket. The way I do this, is to indent them as needed.
Example:
Code:
{ | |
{ | |
{ | |
| |
} | |
} | |
} |
/* and */ to block off the codes, making sure that the paired curly brackets (and maybe also the pairs of parentheses) are blocked correctly.
Example:
Code:
{ | |
{ | |
/* | |
{ | |
| |
} | |
*/ | |
} | |
} |
Everytime you do this, you of course have to call the page on your browser, to try to see if there are any changes in the behavior of the page or changes in the PHP error messages.
Val Zubiri
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
![]()
First of all, the best way to get into making websites, is to make a website for yourself.![]()
The best way get into this is to make a website of your hobby.
For example, if you just had a baby, you might want to make a website of your baby’s pictures. In time, you will discover ways to present your baby pictures, and then ease yourself into discovering how to program your own picture albums, etc.
This example is a little weak, because the idea is picture-based, and there are many ways to show a picture album to visitors without getting into PHP and MySQL.
So let’s move on to a more complicated hobby…
Let’s say you have a comicbook collection. Then you might want the visitors to see your collection LISTED in different ways. Some might want to see your collection arranged according to the date of publication, or according to the superheroes or villains involved, or according to the current market value.
So now you are looking at making a database using MySQL, and commands using PHP to dip into the database and present the information to your visitors.
Because you are so into your hobby, you will eventually attempt to do your best to learn PHP and MySQL. As you discover the capabilities of PHP and MySQL, you will eventually make more expert modifications to your codes.
Val ![]()
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
To me, random text and number generation is useful for:
Password generation
Making new html pages
User generation
Usercode generation
Making new folders
Adding confusion to URLS or making your URLS appear as if you’re a big company with a lot of files and folders.
Sometimes, I automatically just make random text and number combinations and enter them as part of my databases, just in case I would need them in the future. However, before you do this, you really should analyze why you would even do it in the first place. If you are new to coding, do it, just to make you get used to it, and use them and code as you see fit. It will come in handy when someone hires you and you realize that this is useful for your (future) client.

Val Zubiri

Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
If you are new to MySQL, chances are you are still confused with join and the need to have many tables, and how to look for information from different tables using the join and other confusing commands.
What you can do, which is what I did for at least a couple of years, is to just make one huge, wide table, that looked like a spreadsheet. Even if you have to repeat information in certain columns, just try to live with that. Adjust it later on. Of course, when you have a client with a lot of requirements, this might not be advisable.
If you are placing PHP codes in many pages, to dip into the database, you will need to come back to each page to change your code if your database, tables and the way you arrange your information have changed.
Val Zubiri![]()
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
Someone asked me why use PHP in the first place.
When you make a web page, you want your visitors to see the contents of your web page. Some of the contents (or all) might need to be dynamic. That is, you might want the page to adjust depending on who is looking at it.
There will be two “computers” interacting to provide you with the contents on the screen. The first is the remote server, which might be miles away from your, and the visitor’s computer.
It is possible for the remote server to make initial calculations, before sending your visitor the page. OR, it is also possible for the server not to do anything, but serve your visitor the page, and then have the visitor’s computer make the calculations, just prior to showing the content on your visitor’s screen.
PHP can make the calculations on the remote server first, before sending the page to the visitor. The visitor will then just have the html code that shows only what you want the visitor to see.
![]()
Val Zubiri
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
Hello World!
After understanding PHP a little better, printing out Hello World is actually not the best to get a person hooked.
The way I got hooked to PHP was the discovery of the “include” command.
In 1999, I made a single-page website. I thought it was enough to announce my projects. Then I realized it would be better to place the contents, which were divided by subheadings, into separate pages.
So I had to make an initial template, with a single html table, with a top row for the logo and horizontal navigation bar, a left-side column vertical navigation bar, and a bottom row copyright line.
I finalized the contents that would repeat (the logo, the horizontal and vertical navigation bars, and the copyright message) because I was going to copy the format and paste them to all the pages I wanted to have.
So, I cut and pasted the template on separate pages, and placed each page’s content in the middle box of every page.
Guess what? It occurred to me that if I decided to eventually have 150 pages, I would have to go back to each and every page that I had already created, just to make a single change in, for example, a link on a navigation bar!
Once you get hooked on making websites, you will end up with a lot more pages (and ideas) than what you initially planned.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
With the include command, you can initially make, for example four files. One file would just contain the top portion of the webpage - name it “top.htm". The second file would only contain the left side navigation or left column - name it “left.htm". The third would have the copyright line - name it “bottom.htm".
Then you make the fourth page - an “example” page, which is a single page, with the unique contents of that page, AND the top, left and bottom contents. You can do CSS, if you know how, but for now you will just be designing the page using tables. So the table would have the top row, where the logo and top horizontal navigation bar would be, the left side column for the navigation bar, and the bottom row for the copyright line.
What you do next, is to highlight the top portion on that fourth page, delete the logo and the navigation bar, and right where the cursor is blinking in your dreamweaver or whatever else you are using, type in “xxxxx".
Then look at the page’s source code, look for “xxxxx” and in its place, type in
Code:
<?php | |
include ("link/here/top.htm"); | |
?> |
You can actually replace “link/here/top.htm” with something like “http://yourdomain.com/folder_if_any/top.htm". There are a few ways to do this.
Go back to design view, highlight the left side navigation bar, and replace it with “xxxxx". Then go back to the source code view, and look for “xxxxx". Replace this with “http://yourdomain.com/folder_if_any/left.htm".
Do the same with the copyright line.
WAIT!
Before you make a second and third page for your website, you must test your files for this first page!
Upload the pages to your site, open a browser and type in the URL for that fourth page.
You must see your page as complete, with all the four elements intact! If not, the links to the supplementary files would need to be changed. This is where you experiment further. Sometimes, just using “../folder_if_any/top.htm” would work. Sometimes, you may have to use just one period or none at all - try “./folder_if_any/top.htm” or “/folder_if_any/top.htm” or “public_html/yourdomainfolder/folder_if_any/top.htm” or something else.
Everytime you replace the links as shown above, you need to refresh the page on your browser. Once you see all the elements intact and included on the page, you have succeeded!
You can now proceed to make the first page your template. For the second page, copy all and paste the contents of the first page on to a second new page, and right where the section needs for the content to change, erase the previous content and paste (or type) the second page’s unique content. Upload to the same location as the first page. Test the second page… you should continue to see the top, left and bottom contents.
Note: When you upload to another folder, you might encounter an error, which might say that your include commands did not find the necessary files. This is when you start experimenting again with your links.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
What’s the use for all this?
Christmas! When the season changes, you might want your top logo to change, like you might want a snowman next to your logo.
Let’s say you started your website in July, with 5 pages. By December, you have come up with 50 pages. You must anticipate progress. What if you ended up with 500 pages?
With the include command, you simply go to that single top.htm page, change the logo into a logo with the snowman, and save.
Go back to your browser and check 10 pages… all ten would have the logos updated! You have 500 pages? You can be sure that all of them have been updated, and your website’s visitors would see the new logo in all the pages.
Let’s say you started with 5 links on the left side. Then, the following week, you realized that by including another page of useful information would enhance your website. So you have to add a single link to the left navigation bar. Once again, all you need to change is the left.htm page. All the pages in your website will change.
So that’s what “include” is useful for! It saves a lot of time, you don’t have to go back to each and every page, just to change a small portion!
Val Zubiri
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | Current | > >> | ||||
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | |