Ok, this is going to be a tutorial that will show you how to build the frontend of a PHP/MYSQL based chatbox that has a WYSIWYG built in.
First we need to set up the mySQL database:
We’re going to call this table chatmessages for this tutorial. It needs 5 fields:
ID – Bigint, primary , [...]
Archive for the 'PHP Scripts' Category
Simple chatbox tutorial
AJAX Multi-Level Comments
Intro
Folder Structure
MySQL Table
Html And Css
main.css
index.php
AJAX And Javascript
Event Listeners For `Reply` Link
Event Listener For Comment Submitting
Generating Comments
Saving Comments And AJAX
Conclusion
In this tutorial we will create multi level comments. You must have seen comments on youtube and that they have levels depending on who replied to [...]
How To Detect Internet Explorer Version With PHP
Awhile ago I needed to detect the Internet Explorer version of the visitor from inside of my PHP script. Being lazy I just tried to Google for some existing code, but to my surprise there was none available! Well, I think it’s time to rectify that problem by publishing the code I ended up creating. [...]
Free Ads Manager Script in PHP
Free Ads Manager Script in PHP Powered by Expbuilder.com
Introduction
This can let your visitors add the ads without register, there are 2 types of ads:
1- free ads
2- premium ads
you have the full control from admin control panel, like allow, deny or delete.
Also you can make the ads active with client mail (activation mail)
Demo
To see the demo [...]
Generating random passwords
Generating random passwords
It becomes practical and more useful if the tutorial is written in the form of a funtction. This function will hopefully work anywhere.
The basic idea behind this random password is that it will give a different password every time it is called. This can only be done by using the time as the [...]
Looping Statements in PHP
In programming it is often required to repeat a block of code for a given number of times or until a certain condition is not true. For this, we use looping statements. PHP has two major looping statements (FOR and WHILE).
In common practice, FOR loop is mostly used when we need to loop a code [...]
PHP Login script tutorial
PHP Login script tutorial
Overview In this tutorial create 3 files
1. main_login.php
2. checklogin.php
3. login_success.php
Step
1. Create table “members” in database “test”.
2. Create file main_login.php.
3. Create file checklogin.php.
4. Create file login_success.php.
5. Create file logout.php
1- Create table “members”
Code:
CREATE TABLE `members` (
[...]
Simple Ad Rotation Script
Overview
In this script (very easy script), we have 3 ads for rotation
first ad we want it to display 70%
second ad we want to display 20%
and the last one we want to display 10%
What to do
1. Random number 1-100
- if result = 1-70 (we have opportunity to display ad 1, 70%)
- if result = 71-90 (we [...]
Get adsense stats from PHP
Get adsense stats from PHP
Why not let your own script fetch the statistics directly from google adsense reporting site? It’s always much easier to have the data locally in your own database, and then create scripts to display the stats in the way you are interested in.
I will now give you the code that collects [...]
XML processing with PHP
XML processing with PHP
Introduction
XML is Extensible Markup Language. It is a markup language – much like HTML – and was designed to describe data. XML uses tags but these tags are not predefined as in HTML. In XML you define your own tags. All XML documents have 3 types of components: Elements, attributes and data.
Let’s [...]
