Hi Nick,
There is no need to get all fancy with forms and stuff. You can do it in pure php.
Here is an example that I am running as to populate a local database from a central database from elsewhere.
<?
//connect to local database
$hostname_vatsaf = "XXXXXXX";
$database_vatsaf = "XXXXXXX";
$username_vatsaf = "XXXXXXX";
$password_vatsaf = "XXXXXXX";
$vatsaf = mysql_connect($hostname_vatsaf, $username_vatsaf, $password_vatsaf) or die ('I cannot connect to the database because: ' . mysql_error());
// Clear Local Database
mysql_select_db($database_vatsaf, $vatsaf);
mysql_query("DELETE FROM vatmembers WHERE 1=1");
// Retrieve remote data
$data = file('http://remotedomain.com/divdb.php'); // The source file
foreach ($data as $row_num => $dataRow)
// Scrape data
{
list($vid, $rating, $name, $surname, $email, $age, $state, $country, $experience, $endsuspend, $regidate, $div) = split(",", $dataRow);
//Print data on screen. This is commented but used to check if the actual data was indeed scraped from the source
//echo $vid, ' ', $name, ' ', $surname, ', ', $state, ', ', $country, "<br />";
// Insert into database
$sql = "INSERT INTO vatmembers (vid, name, surname, state, country) VALUES ('$vid', '$name', '$surname', '$state', '$country')";
mysql_query($sql);
}
?>
The file is included into another page and run as soon as the page is loaded.
Alternatively it can be run as a CRON to populate the db on a regular basis.
I hope this helps.