I have an array, part of which is updated during the script, and I am looking to pass that value across when the page updates 60 seconds later.
So far I have:
Code: Select all
$connections_array[] = array('server' => '123.456.789.012:3306',
'user' => $u,
'password' => $p,
'database' => 'MySQL01',
'sendmail' => '0',
'dbID' => '01'
);
//and repeat multiple times
for($i = 0; $i <sizeof($connections_array); $i++) {
//Execute MySQL Query and if result x is achieved
$connections_array[$i]['sendmail'] = '1';
Code: Select all
Print " <form name=\"SendMailState\" action=\"testPage.php\" method=\"post\">\n ";
for($a = 0; $a <sizeof($connections_array); $a++) {
$SendState = $connections_array[$a]['sendmail'];
$SendDB = $connections_array[$a]['dbID'];
print " <INPUT TYPE=\"hidden\" NAME=\"$SendDB\" VALUE=\"$SendState\"><br/>\n ";
}
print " </form>\n";
Code: Select all
$connections_array[] = array('server' => 'localhost:3306',
'user' => $u,
'password' => $p,
'database' => 'MySQL01_5083',
'sendmail' => '0',
'dbID' => '01');
if (isset($_POST['01'])) {
$connections_array[]['sendmail'] = '1';