Sessions versus cookies
I used to prefer sessions to cookies.
However, a lot of websites nowadays send cookies out anyway, and users don’t seem to care anymore.
One of my websites once got flagged by Google - something like the site is not to be trusted, which I disagreed with. It took about 24 hours to resolve the dispute, but it took months before I even discovered that this alert had been going on. I was at the losing end, however which way I tried to analyze it.
Actually, the I was using allowed adult sites on their servers. That could also have been the culprit. I may have been sharing the server with websites that had malicious ware.
Lately, I try to just avoid both cookies and sessions as much as possible. At least I sleep better.
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
How to Have a Useful Business to Business Website
If you want related businesses to discover you, here is how it can be done.
1. Attend the huge conventions, get the convention books - the original and the errata, which list all the exhibitors and what they have.
2. Go to all the different booths, take pamphlets, business cards and whatever else they have. Take some of their free samples, like frisbees and pens.
3. Place everything in boxes in the shipping department, and ship them to your home or office.
4. Take pictures and videos of your trip. If someone wants to talk to your camcorder, let them talk.
5. When you get back to your home base, sort through everything you have. Scan what you can scan.
6. Brainstorm and find ways to help everyone or a majority in your field through one or a few websites.
7. Share your photographs and videos. Use YouTube to store your videos if you want.
8. Make interrelated websites - it could be a blog, a forum or more, like a directory. Have even more functionality, like a way where people can post what they want or find what they need from other users or a blog or showcase of new products. Have a section for press releases and diligently post them as they get faxed or emailed to you. One of the better ways you can almost be sure that everyone will want to come to your site, is to have a job board.
9. Let everyone know, make them register and place your own agenda on top of every page.
10. There will come a point when other companies will take notice and even send you samples which you can raffle away to your users, or give to your friends.
11. Look into publishing a newsletter.![]()
12. AUTOMATE AS MANY OF THESE AS POSSIBLE, including making forms so that everyone who is allowed to contribute up-to-date articles will be able to just type away stuff, and easily upload pictures and even videos.
13. If you can’t do all this, call me.![]()
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
How I Attracted Visitors in the Past![]()
![]()
I know what I’m going to tell you is almost like a waste of time and space, but for purposes of attracting visitors just for the heck, it will work. However, you might have a mission of just concentrating on your own information, so this would be a useless suggestion. I can’t even say that this is a suggestion.
This is useless for companies doing business, but if you are just a hobbyist, or just learning to code, then this is a good way to practice.
The CIA produces an annual profile of countries. It’s called The World Factbook, and it’s free. I’ve seen the same information published like an informative, encyclopedia type of a book, but I’m sure the information was free to be had anyway. Some publisher simply put everything together and sold it in the bargain bin. I could be wrong.
Copy and paste each country, tab the information correctly, do whatever you have to do, and get everything to a table in a MySQL database.
Then design a single page that would show a single country, and use that as a template. Copy and rename the file to produce different countries, and use PHP to dip into the database.
So there you go! You will have more than 180 pages of more than 180 countries and continents and whatever else, which provide information to the public. Make a site map or another page listing all of the countries in one place.
Add some ads which might make you some money!
Let’s say you have 5 pages of your interest, and you’re not sure if anyone is going to come visit your 5-page information. Now, you will have more than 180 pages of countries, and these visitors just might click through your other 5 pages.
Consider the exercise as like producing billboards on a highway. Some people look, some people don’t. It’s a numbers game, plus it’s an excuse to practice what you know.
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
How to Have Alternating Colors in Table Row Results
1. Pick two colors for table cell backgrounds. For example, light cream and light green.
2. When you dip into the MySQL table, you will be using a while loop. You will also be using two other elements.
3. The first is the use of $i=0, $i++ while using the “while loop”
4. The second is the use of the modulo % to get the remainder.
5. As you use the “while” loop, you increment the $i by 1 each time, and you will be dividing $i by 2, $i % 2.
6. You also place the condition, if the remainder is 0, then use the light cream, and if the remainder is 1, then use the light green.
Note, if you want three colors, just do the same thing, use $i % 3, and if the remainder is 0, 1 or 2, then use color1, color2 or color3. Obviously, if your site is gay, and you want the gay colors to appear, use $i % 6, assigning 6 colors, but I think that would look tacky. I think red and white with a little blue and some stars appearing in the background would look like an American flag.
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
How to clean entries submitted in forms![]()
If you are asking for usernames and email addresses in your forms, you want to make sure that they are unique.
Spaces, whether they are intentional or unintentional should be taken out, before the submission goes to the database.
Use the following functions:
trim() With trim, spaces before and after a submission gets taken out. For example,
Code:
" the quick fox " |
Code:
"the quick fox" |
eregi_replace() This takes three elements: The pattern you want to replace, the replacement pattern, and the variable or entry in question.
Example: In
Code:
$theoldstring = " the quick fox " |
Code:
$thenewstring = eregi_replace(" ", "", $theoldstring); |
Code:
$thenewstring = "thequickfox"; |
strtolower() You might also want to convert all entries for the username to lower case when you enter them into the MySQL table, even if the MySQL has the entry programmed as text that does not care whether the characters are in uppercase or lowercase.
Note: Look up the difference between eregi_replace() and ereg_replace(). Eregi does not care about capitalization. Ereg does, so in this case, since we’re just concerned with replacing spaces, both would work. However, I prefer to just keep using eregi.
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 | 30 | 31 |