First, you need to modify your "subs" table to include "created" column. Make this column a type of boolean, and give it a default value of FALSE. Then, break this up into two scripts. First script:
<?php
include 'mysql-connect.php';
$username = $_POST['username'];
$password = $_POST['password'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$ip = $_SERVER['REMOTE_ADDR'];
$strCheckUserSQL = "SELECT * FROM subs WHERE username='$username'";
$CheckUserQuery = mysql_query($strCheckUserSQL);
$strCheckEmailSQL = "SELECT * FROM subs WHERE email='$email'";
$CheckEmailQuery = mysql_query($strCheckEmailSQL);
// You really should escape these values, but I'm not going to do that here
mysql_query("INSERT INTO subs (username, password, firstname, lastname, ip, email)
VALUES ('$username', '$password', '$firstname', '$lastname', '$ip', '$email')");
Create this cron script in your [home] folder, NOT your public_html folder.
#!/usr/bin/php
<?php
$strCheckSubSQL = "SELECT * FROM subs WHERE created=false";
//Connect to the database
$result = mysql_query($strCheckSubSQL);
while($row = mysql_fetch_array($result)) {
//Create the user in cPanel
//Update the record with created=true
}
//Close the connection You'll also need to chmod the cron script to 777.