Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by bh

  1. Is your xml coded in UTF-8? (not the file, the xml content... <?xml version="1.0" encoding="UTF-8"?>)
  2. 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...
  3. Then try it with NOW() function. NOW() is almost equivalent with CURDATE() except NOW() has time parts (but i think its ok for you).
  4. Hi, In turn it seems ok. Try CURRENT_DATE() or CURRENT_DATE, which are synonyms of CURDATE
  5. 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']\"
  6. 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)
  7. Hi, Your friend will be the time() function and strtotime(). Example: $seconds = time() - strtotime(str_datatime_format);
  8. 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);
  9. Hi, try this: var sum= "<?= mysql_num_rows($result); ?>";
  10. Hi, time() is an Unix timestamp. You can create a formatted date from time() -> date('Y-m-d', time())
  11. Hi, if (isset($_POST['option']) && is_array($_POST['option'])) { foreach ($_POST['option'] as $option) { echo $option.', '; } }
  12. Have you heard about normalization? Its a cool stuff...
  • Create New...

Important Information

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.