Posts Tagged ‘php’

How to Pass All Elements of a Form to the End in a Multi-Page Form

Sunday, January 27th, 2008

Sometimes forms get long, unsightly, and intimidating. It’d be great if you could cut them up into three or four parts - with a few fields on each page.

In order to do that, you need to figure out some way of storing or passing along the information from the first pages. I’ve heard a bunch of crazy ideas - from storing the information in session variables to writing each part to the database.

The easiest thing to do is attach a very brief php function to the bottom of each page. It’ll do all the work for you and continue to post every item the user has entered. (more…)

Why Is My htaccess File Causing an Internal Server Error 500?

Friday, January 25th, 2008

This was the odd problem that I faced when I switched hosts last month. My other website (Babel) was working fine. I uploaded everything to the new host, and every page came up with an “Internal Server Error 500.”

I eventually narrowed the problem down to the htaccess file. I wasn’t quite sure why it was breaking everything… but if I renamed it, the files worked fine.
(more…)

How to Use the Crypt() Function to Encrypt and Check Passwords

Tuesday, January 22nd, 2008

Every php-script that involves some kind of user login and database interaction has one very important feature - password checking and encryption.

There are a bunch of ways you could create and check passwords - from an insecure string in a database to an encrypted “hash” that you check against user input. This tutorial will show you how to use the crypt() function to store and check passwords in a php script.
(more…)

How to Write a PHP Script to Send a Trackback

Tuesday, January 8th, 2008

Don’t know what a trackback is? Check out this set of articles for a bit more information.

Assuming you do know what a trackback is, how do you send one - technically speaking? And how can we write a php script to send one?

A trackback is a simple ping - an HTTP Request. It is specially formatted with a limited amount of information. The receiving server is set up to handle that information and use it to create the comment based on your trackback ping.
(more…)