Hi Matty,
Yes, both
require_once('../../../wp-config.php');
require_once('../../../wp-load.php');
work.
And require_once(...)
is very critical, without this line, the insert does not work! will get an error.
I tried another code, which also worked.
<?php
require_once('/Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-config.php');
// change to your own directory if necessary
global $wpdb;
$table = $wpdb->prefix."main_table"
$wpdb->query("INSERT INTO $table (album, artist) VALUES ($_POST['album'], $_POST['artist'])");
?>