# The Occasional Tutorial

**URL:** https://www.phphelp.com/c/the-occasional-tutorial/10.md?page=1

[Latest](https://www.phphelp.com/latest.md) · [Categories](https://www.phphelp.com/categories.md)

**Page:** 2

---

## [Writing re-usable OOP PHP code](https://www.phphelp.com/t/writing-re-usable-oop-php-code/20341)

<div class="topic-metadata">

**Author:** [@sebrenauld](https://www.phphelp.com/u/sebrenauld)\
**Replies:** 1\
**Last updated:** [May 23, 2013, 2:50pm UTC](https://www.phphelp.com/t/writing-re-usable-oop-php-code/20341 "2013-05-23T14:50:31Z")

</div>

This tutorial stems from a discussion on StackOverflow (http://stackoverflow.com/questions/16700375/alternatives-to-static-methods-in-a-framework-php/16700764) and is meant as a tutorial to writing efficient, re-usable a…

---

## [A brief intro to design patterns](https://www.phphelp.com/t/a-brief-intro-to-design-patterns/20308)

<div class="topic-metadata">

**Author:** [@sebrenauld](https://www.phphelp.com/u/sebrenauld)\
**Replies:** 12\
**Last updated:** [May 21, 2013, 4:21am UTC](https://www.phphelp.com/t/a-brief-intro-to-design-patterns/20308 "2013-05-21T04:21:42Z")

</div>

If you have done any kind of PHP interviews recently, you’ll have heard questions like “What is a design pattern?”. Maybe you know already - maybe you don’t. I’m writing this to help provide a concise, pragmatic list to …

---

## [Tutorial For PHP Development-1](https://www.phphelp.com/t/tutorial-for-php-development-1/20057)

<div class="topic-metadata">

**Author:** [@Codex](https://www.phphelp.com/u/Codex)\
**Replies:** 0\
**Last updated:** [April 14, 2013, 2:15pm UTC](https://www.phphelp.com/t/tutorial-for-php-development-1/20057 "2013-04-14T14:15:48Z")

</div>

Check Out this Tutorial for Web Development in PHP… Please bother yourself to use Ear Phones… http://youtu.be/HeNBR5McbE8

---

## [A simple OOP Comments Display Section](https://www.phphelp.com/t/a-simple-oop-comments-display-section/19861)

<div class="topic-metadata">

**Author:** [@Strider64](https://www.phphelp.com/u/Strider64)\
**Replies:** 0\
**Last updated:** [March 16, 2013, 1:48am UTC](https://www.phphelp.com/t/a-simple-oop-comments-display-section/19861 "2013-03-16T01:48:31Z")

</div>

I’ve been teaching myself PHP for over the last couple of months. I have previous programming experience in other languages. I think I have finally grasp programming PHP in the object oriented style. This short tutorial…

---

## [On the fly searching results as you type.](https://www.phphelp.com/t/on-the-fly-searching-results-as-you-type/17680)

<div class="topic-metadata">

**Author:** [@ttbakiatwoam](https://www.phphelp.com/u/ttbakiatwoam)\
**Replies:** 3\
**Last updated:** [November 25, 2012, 2:50am UTC](https://www.phphelp.com/t/on-the-fly-searching-results-as-you-type/17680 "2012-11-25T02:50:46Z")

</div>

I have found this little bit of code vary useful and I thought I would give it to you all. The basic idea here is that as an individual types something in an text field the java script runs another php file with every …

---

## [Very Basic User Login Using Cookies and MySQL](https://www.phphelp.com/t/very-basic-user-login-using-cookies-and-mysql/18162)

<div class="topic-metadata">

**Author:** [@ttbakiatwoam](https://www.phphelp.com/u/ttbakiatwoam)\
**Replies:** 17\
**Last updated:** [November 2, 2012, 6:50pm UTC](https://www.phphelp.com/t/very-basic-user-login-using-cookies-and-mysql/18162 "2012-11-02T18:50:23Z")

</div>

Here is a single script for user authentication checking. With this script you will only need this page to authenticate users for your “members only sections” Most utilities like this like to use three pages. One for the…

---

## [Guideline for writing cleaner PHP coding](https://www.phphelp.com/t/guideline-for-writing-cleaner-php-coding/18454)

<div class="topic-metadata">

**Author:** [@Clydebrown](https://www.phphelp.com/u/Clydebrown)\
**Replies:** 3\
**Last updated:** [October 19, 2012, 12:00am UTC](https://www.phphelp.com/t/guideline-for-writing-cleaner-php-coding/18454 "2012-10-19T00:00:15Z")

</div>

There are several benefits of writing clean code for any project , no matter how small it is. The main benefit is that when you want to edit and read it after a long break then you can get an idea instantly about code. A…

---

## [How to compile of PHP file?](https://www.phphelp.com/t/how-to-compile-of-php-file/18318)

<div class="topic-metadata">

**Author:** [@Rohit421991](https://www.phphelp.com/u/Rohit421991)\
**Replies:** 1\
**Last updated:** [September 16, 2012, 3:17am UTC](https://www.phphelp.com/t/how-to-compile-of-php-file/18318 "2012-09-16T03:17:37Z")

</div>

I have created a class in PHP, that contains some useful methods. Now I want to give it to my client so that he can be able to use it just like server control in asp.net instead of providing code file. How can I compile…

---

## [New to PHP](https://www.phphelp.com/t/new-to-php/17175)

<div class="topic-metadata">

**Author:** [@Ojoshiro](https://www.phphelp.com/u/Ojoshiro)\
**Replies:** 1\
**Last updated:** [July 14, 2012, 12:54am UTC](https://www.phphelp.com/t/new-to-php/17175 "2012-07-14T00:54:02Z")

</div>

Hello, I see a lot of “I’m new to PHP, Javascript and HTML and I ran into the following problem” after which you get a piece of code that seems to be cut-and-pasted together or worse, directly copied off some existing s…

---

## [Basic Register that actually works...](https://www.phphelp.com/t/basic-register-that-actually-works/17578)

<div class="topic-metadata">

**Author:** [@Merely](https://www.phphelp.com/u/Merely)\
**Replies:** 2\
**Last updated:** [July 7, 2012, 8:56am UTC](https://www.phphelp.com/t/basic-register-that-actually-works/17578 "2012-07-07T08:56:15Z")

</div>

All these registers I’ve been trying to make never work. I don’t know if it’s my database or what but they never work. If someone could find/make me a register that actually works I’d be happy.

---

## [Updating multiple records from one form](https://www.phphelp.com/t/updating-multiple-records-from-one-form/17310)

<div class="topic-metadata">

**Author:** [@Ojoshiro](https://www.phphelp.com/u/Ojoshiro)\
**Replies:** 0\
**Last updated:** [June 12, 2012, 11:22am UTC](https://www.phphelp.com/t/updating-multiple-records-from-one-form/17310 "2012-06-12T11:22:01Z")

</div>

Hello me, it’s me again, I have hung around on this board for a while now and I have seen some problems pop up over and over again. I’d like to try and tackle one here: the problem of updating many records (in a databas…

---

## [A Basic Email form](https://www.phphelp.com/t/a-basic-email-form/17257)

<div class="topic-metadata">

**Author:** [@RaythXC](https://www.phphelp.com/u/RaythXC)\
**Replies:** 0\
**Last updated:** [June 6, 2012, 1:04am UTC](https://www.phphelp.com/t/a-basic-email-form/17257 "2012-06-06T01:04:52Z")

</div>

Lot’s of people seem to have form problems, so as well as cover a basic form, we’re going to have this email you as well. Heres the form you need: Form.html \<form action="send.php" method="POST"\> Name: \<input type="te…

---

## [Useful tip: Beginners, start small.](https://www.phphelp.com/t/useful-tip-beginners-start-small/17137)

<div class="topic-metadata">

**Author:** [@Ojoshiro](https://www.phphelp.com/u/Ojoshiro)\
**Replies:** 1\
**Last updated:** [May 29, 2012, 1:28pm UTC](https://www.phphelp.com/t/useful-tip-beginners-start-small/17137 "2012-05-29T13:28:23Z")

</div>

Hi, I noticed there are a lot of ‘beginners’ in this forum who ‘start’ with trying to write a multiuser game, a forum, a shop-site or a Wall-Street cracking Artificial Intelligence. Here’s the tip: \[center\]Start with …

---

## [Looking to Delete Table Entries?](https://www.phphelp.com/t/looking-to-delete-table-entries/15052)

<div class="topic-metadata">

**Author:** [@PHP\_Person](https://www.phphelp.com/u/PHP_Person)\
**Replies:** 4\
**Last updated:** [May 28, 2012, 12:42am UTC](https://www.phphelp.com/t/looking-to-delete-table-entries/15052 "2012-05-28T00:42:02Z")

</div>

This is a working script that lists the table entries then deletes the ones selected. The script: \[php\] \<?php mysql\_connect("localhost", "forumdb", "asd123"); mysql\_select\_db("forumdb"); $checked = $\_POST\['checked'\]; …

---

## [Please Help Me With My Application Form](https://www.phphelp.com/t/please-help-me-with-my-application-form/16518)

<div class="topic-metadata">

**Author:** [@ajsinz](https://www.phphelp.com/u/ajsinz)\
**Replies:** 0\
**Last updated:** [April 4, 2012, 11:06pm UTC](https://www.phphelp.com/t/please-help-me-with-my-application-form/16518 "2012-04-04T23:06:59Z")

</div>

Hello i have searched for days for a way to get my form to work…I get a Sent Successfully message but nothing shows up in my email account…please help me because im clearly missing something. Heres the form code from t…

---

## [The advantage of comments](https://www.phphelp.com/t/the-advantage-of-comments/16497)

<div class="topic-metadata">

**Author:** [@Ojoshiro](https://www.phphelp.com/u/Ojoshiro)\
**Replies:** 0\
**Last updated:** [April 3, 2012, 3:06pm UTC](https://www.phphelp.com/t/the-advantage-of-comments/16497 "2012-04-03T15:06:55Z")

</div>

Hi, Comments in your code are handy, sometimes really helpful and for other people reading your code priceless, but comments can also help you debug your code. How that works? If you’re twelve levels deep buried in l…

---

## [Logging out](https://www.phphelp.com/t/logging-out/16379)

<div class="topic-metadata">

**Author:** [@NewCoder72](https://www.phphelp.com/u/NewCoder72)\
**Replies:** 3\
**Last updated:** [March 28, 2012, 7:17am UTC](https://www.phphelp.com/t/logging-out/16379 "2012-03-28T07:17:59Z")

</div>

Difficulty: Super easy This is just something very quick and basic. Here is a logout code. I added in comments. \[php\]\<?php session\_start(); //That continues on the started session session\_destroy(); //That destroye…

---

## [Debugging](https://www.phphelp.com/t/debugging/8623)

<div class="topic-metadata">

**Author:** [@Monk](https://www.phphelp.com/u/Monk)\
**Replies:** 12\
**Last updated:** [March 21, 2012, 4:39am UTC](https://www.phphelp.com/t/debugging/8623 "2012-03-21T04:39:25Z")

</div>

Well, we see more questions here of the type ‘this doesn’t work, why not?’ than of anything else, so I’m going to give you some debugging tips. Afterall, we can’t really do anything that you can’t yourself… we just migh…

---

## [Contact Form Tutorial](https://www.phphelp.com/t/contact-form-tutorial/11442)

<div class="topic-metadata">

**Author:** [@nuttycoder](https://www.phphelp.com/u/nuttycoder)\
**Replies:** 7\
**Last updated:** [March 17, 2012, 5:52pm UTC](https://www.phphelp.com/t/contact-form-tutorial/11442 "2012-03-17T17:52:42Z")

</div>

Need a contact form for your site? This tutorial shows you how to create one. This tutorial assumes you have a basic knowledge of PHP there are other tutorials on this site that explains some of the mechanics used here. …

---

## [Upload multiple files, create a directory, save files in the new directory](https://www.phphelp.com/t/upload-multiple-files-create-a-directory-save-files-in-the-new-directory/13787)

<div class="topic-metadata">

**Author:** [@plintu](https://www.phphelp.com/u/plintu)\
**Replies:** 4\
**Last updated:** [February 29, 2012, 6:17pm UTC](https://www.phphelp.com/t/upload-multiple-files-create-a-directory-save-files-in-the-new-directory/13787 "2012-02-29T18:17:19Z")

</div>

First to upload files we need to create a form: \[code\] \[/code\] ok first take notice of the input name uploads\[\], the \[\] symbols is telling php that it will be an array of files so when we collect the info in upload…

---

## [MOVED: Is there way to track web URL redirect with PHP?](https://www.phphelp.com/t/moved-is-there-way-to-track-web-url-redirect-with-php/15461)

<div class="topic-metadata">

**Author:** [@jSherz](https://www.phphelp.com/u/jSherz)\
**Replies:** 0\
**Last updated:** [January 6, 2012, 4:59pm UTC](https://www.phphelp.com/t/moved-is-there-way-to-track-web-url-redirect-with-php/15461 "2012-01-06T16:59:58Z")

</div>

This topic has been moved to General PHP Help. \[iurl\]http://www.phphelp.com/forum/index.php?topic=9807.0\[/iurl\]

---

## [MOVED: free hosting with mail() function and SMTP server enable?](https://www.phphelp.com/t/moved-free-hosting-with-mail-function-and-smtp-server-enable/15460)

<div class="topic-metadata">

**Author:** [@jSherz](https://www.phphelp.com/u/jSherz)\
**Replies:** 0\
**Last updated:** [January 6, 2012, 4:57pm UTC](https://www.phphelp.com/t/moved-free-hosting-with-mail-function-and-smtp-server-enable/15460 "2012-01-06T16:57:33Z")

</div>

This topic has been moved to General PHP Help. \[iurl\]http://www.phphelp.com/forum/index.php?topic=12851.0\[/iurl\]

---

## [When and How to validate your PHP variables](https://www.phphelp.com/t/when-and-how-to-validate-your-php-variables/14648)

<div class="topic-metadata">

**Author:** [@Mikesta](https://www.phphelp.com/u/Mikesta)\
**Replies:** 0\
**Last updated:** [October 5, 2011, 12:37am UTC](https://www.phphelp.com/t/when-and-how-to-validate-your-php-variables/14648 "2011-10-05T00:37:42Z")

</div>

This is a tutorial I wrote a little while ago for my blog: blackscorner.me I have a few more tutorials on there, mostly on PHP. If people are interested I can post more. Link to actual tutorial: http://blackscorner.me/…

---

## [MOVED: hello all I am noob here](https://www.phphelp.com/t/moved-hello-all-i-am-noob-here/14512)

<div class="topic-metadata">

**Author:** [@OpzMaster](https://www.phphelp.com/u/OpzMaster)\
**Replies:** 0\
**Last updated:** [September 19, 2011, 4:05pm UTC](https://www.phphelp.com/t/moved-hello-all-i-am-noob-here/14512 "2011-09-19T16:05:12Z")

</div>

This topic has been moved to Greetings. \[iurl\]http://www.phphelp.com/forum/index.php?topic=10684.0\[/iurl\]

---

## [Searching with PHP and MySQL beyond LIKE](https://www.phphelp.com/t/searching-with-php-and-mysql-beyond-like/11443)

<div class="topic-metadata">

**Author:** [@nuttycoder](https://www.phphelp.com/u/nuttycoder)\
**Replies:** 2\
**Last updated:** [December 19, 2008, 10:13am UTC](https://www.phphelp.com/t/searching-with-php-and-mysql-beyond-like/11443 "2008-12-19T10:13:40Z")

</div>

Ever wanted to add a search feature to your php & MySQL driven web site? Then your in luck this tutorial shows you how! This tutorial assumes you already have a MySQL database and a table with some data already in your …

---

## [Basic getting info script, possibilities are endless!](https://www.phphelp.com/t/basic-getting-info-script-possibilities-are-endless/10969)

<div class="topic-metadata">

**Author:** [@PhpCoder](https://www.phphelp.com/u/PhpCoder)\
**Replies:** 0\
**Last updated:** [February 29, 2008, 10:35pm UTC](https://www.phphelp.com/t/basic-getting-info-script-possibilities-are-endless/10969 "2008-02-29T22:35:46Z")

</div>

With a script like this you can build off it. For example, you can get e-mail addresses, phone numbers, contact info, you can get user feedback, just by editing it, and using your imagination. This is using PHP + MYSQL. …

---

## [User Login Script](https://www.phphelp.com/t/user-login-script/10936)

<div class="topic-metadata">

**Author:** [@Zyppora](https://www.phphelp.com/u/Zyppora)\
**Replies:** 2\
**Last updated:** [February 26, 2008, 8:00am UTC](https://www.phphelp.com/t/user-login-script/10936 "2008-02-26T08:00:11Z")

</div>

As requested, a user-login tutorial. This tutorial will show you a basic user login script, how it is set up and how it works. It’s going to run on cookies (simply because I haven’t mastered sessions yet :stuck\_out\_tongu…

---

## [Hit Counter & Users Online Script](https://www.phphelp.com/t/hit-counter-users-online-script/8607)

<div class="topic-metadata">

**Author:** [@evilcoder](https://www.phphelp.com/u/evilcoder)\
**Replies:** 12\
**Last updated:** [January 20, 2008, 5:39am UTC](https://www.phphelp.com/t/hit-counter-users-online-script/8607 "2008-01-20T05:39:34Z")

</div>

Hey everyone, this is just a simple script which will tell you how many people are online on your site and how many pages hits you’ve had in both the last 24 hours and all up. Create database and place this dump inside …

---

## [Random Line from a file](https://www.phphelp.com/t/random-line-from-a-file/10618)

<div class="topic-metadata">

**Author:** [@Acecool](https://www.phphelp.com/u/Acecool)\
**Replies:** 1\
**Last updated:** [January 12, 2008, 5:22am UTC](https://www.phphelp.com/t/random-line-from-a-file/10618 "2008-01-12T05:22:41Z")

</div>

http://www.acecoolco.com/tutorials/18/random-line-from-a-file/page\_1/tutorial\_27.html This tutorial will show you how to retrieve a random line from a file which can be used for random quotes, random ads and other misc …

---

## [Fail safe includes and requires](https://www.phphelp.com/t/fail-safe-includes-and-requires/10617)

<div class="topic-metadata">

**Author:** [@Acecool](https://www.phphelp.com/u/Acecool)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 1:46am UTC](https://www.phphelp.com/t/fail-safe-includes-and-requires/10617 "2007-12-05T01:46:41Z")

</div>

http://www.acecoolco.com/tutorials/3/fail-safe-includes-and-requires/page\_1/tutorial\_24.html This tutorial shows you how to use a built in php check to safely remove errors Code added for ease of use: This check check…

[Previous page](https://www.phphelp.com/c/the-occasional-tutorial/10.md)

[Next page](https://www.phphelp.com/c/the-occasional-tutorial/10.md?page=2)
