The most simple PHP contact form
Published on : 19.03.2010
Category : PHP Viewed : 0 times.
In this tutorial, I’ll show you how to write the most basic PHP/HTML contact form script. So if you’re looking for validated forms or a fancy flash form, this tutorial isn’t for you.
Before you begin, make sure that your hosting provider supports PHP.
First, lets open Dreamweaver or your favorite text editor and start typing the following. You can copy it, but you should really type it out to get an understanding of how it is working. <html> <head>... |
Post to twitter from your own custom pages
Published on : 19.03.2010
Category : PHP Viewed : 0 times.
Are you a frequent twitter poster? Here i am written a simple tutorial on how to post to twitter from your own custom page using twitter api.
As first we need to create a form to get the message that need to post to twitter.
<form id="tweet" name="tweet" method="post" action="tweet.php"> <textarea name="tweet-msg" rows="5" cols="50"></textarea><br /> <input name="submit" type="submit" value="Tweet it" /> </form>
This form will submit the message to... |
Guestbook tutorial in 3 easy steps
Published on : 19.03.2010
Category : PHP Viewed : 2 times.
Step #1: creating the database and table.
First of all you need to create a database, the process of doing so is fairly simple.
To create a database, you will need to use a database management tool. I personally recommend using phpMyAdmin – it is one of the most popular database management tools out there.
Local servers: If you are using an web server pack (i.e. xampp), it will most likely be here: http://127.0.0.1/phpmyadmin/ If not, you will have to install it manually. You can... |
Very simple PHP counter
Published on : 19.03.2010
Category : PHP Viewed : 6 times.
This is a simple tutorial on how to make your own Web Counter, to put it into your web page. We’ll start by creating a counter text file named “hitcounter.txt” and save it to the same directory you will put your counter in.
Next, open your PHP editor and save the document as “counter.php”.
Now, we’ll set the variable for the file named “hitcounter.txt”. Remember to place the filename in quotes.
Code:
<?php $count_my_page =... |
PHP Tutorial (File Handling): Scratch Pad
Published on : 19.03.2010
Category : PHP Viewed : 0 times.
Prerequisite
Knowledge of basic PHP syntax.
In this tutorial you will learn about
File Handling
Functions
We will be using 3 predefined functions for file handling
fopen: To open a file
file_get_content: To read a file
fclose: To close a file
Little theory before we begin
Opening a file
Predefined function fopen() is used to open a file. It returns a variable which can be used for accessing the file. Returned variable is called as file handler. Syntax:
$var =... |
Working with RESTful Services in CodeIgniter
Published on : 19.03.2010
Category : PHP Viewed : 0 times.
Assumptions
You have a web server set up, locally or online and known how to manage files on it.
You have read a few of the CodeIgniter from Scratch tutorials.
You know how to set up CodeIgniter.
You know a little about RESTful services.
This tutorial is broken down into two parts. We will start by learning how to create a RESTful service, then further down, we will learn how to interact with it in a few different ways.
Part 1 – Creating a RESTful API
Step 1: Setting up the... |
Easy Mod_Rewrite with PHP tutorial
Published on : 10.03.2010
Category : PHP Viewed : 10 times.
I have been playing around with Apaches mod_rewrite on my other site http://www.2big2send.com and i must admit its a whole lot easier than i first thought..
Here is a quick guide for most general use:
Create a new file in your main directory (public_html for cPanel or httpdocs for plesk – not sure about other ones) called .htaccess (Dont forget the ‘.’ dot before the name – you may already have one of these file, thats ok, just edit it and follow the guide... |
Simple site stats counter
Published on : 10.03.2010
Category : PHP Viewed : 15 times.
This script is simple because it's using this flatfile thingy and it uses files as databases. That means you will take info and write it into another file so back to this tutorial. First make a file called counter.txt and change it's CHMOD to 777
<?php//User referer$referer = $_SERVER['HTTP_REFERER'];// User ip$ip = $_SERVER['REMOTE_ADDR'];//Your browser info$browser = $_SERVER['HTTP_USER_AGENT'];//Date$date = date('r'); // Theres no referer then it will be marked with -if($ref ==... |
The most simple PHP contact form
Published on : 10.03.2010
Category : PHP Viewed : 7 times.
In this tutorial, I’ll show you how to write the most basic PHP/HTML contact form script. So if you’re looking for validated forms or a fancy flash form, this tutorial isn’t for you.
Before you begin, make sure that your hosting provider supports PHP.
First, lets open Dreamweaver or your favorite text editor and start typing the following. You can copy it, but you should really type it out to get an understanding of how it is working. <html> <head>... |
Building a Simple Monthly Calendar
Published on : 07.03.2010
Category : PHP Viewed : 28 times.
In this tutorial we are going to learn how to build a simple calendar in PHP. You have seen many of those calendar date pickers mostly in Javascript. This PHP based one has a slightly different purpose - instead of populating an input field, it outputs links for the different dates and can be used for example as a monthly archive in a dynamic DB-driven site.
We will build this calendar following good coding practices and keeping the login in one PHP file and the presentation in one... |