Probably any POST value hasnt got a right type.
Example Phonenumber is a number in your SQL structure, but your post value is a string with a backslash or something...
Hi,
First look the cause of the error is the insert statement. Try this:
$sql="INSERT INTO Customers (CustomerID, EmailAddress, Postalcode, Phonenumber, Forename, Surname, Address)
VALUES ($_POST['CustomerID'], \"$_POST['EmailAddress']\", $_POST['Postalcode'], $_POST['Phonenumber'], \"$_POST['Forename']\", \"$_POST['Surname']\", \"$_POST['Address']\");";
If phonenumber is a VARCHAR then: \"$_POST['Phonenumber']\"
Hi,
First explode your $nums variable with explode function.
And then array_reverse function will be solved your problem. but dont you tought any sorting algorithm ? (it will be more beautiful)
Hi,
it will be more lucky if timestamps are in an other array.
Heres an example with array_multisort function:
$array[0][0] = timestamp;
$array[0][1] = data;
$array[1][0] = timestamp;
$array[1][1] = data;
$array[2][0] = timestamp;
$array[2][1] = data;
$sorter = array();
foreach ($array as $item)
{
$sorter[] = $item[0];
}
array_multisort($array, $sorter);
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.