Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][PHP]Sprawdzanie poprawności daty
Dreiven
post
Post #1





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 27.05.2014

Ostrzeżenie: (0%)
-----


Witam,

Mam problem z takim oto kodem:

  1. <!DOCTYPE html>
  2. <meta charset="UTF-8">
  3. <title>DATA</title>
  4. </head>
  5. <form action="data.php" method="get">
  6. <div><label for="firstname">Imię:
  7. <input type="text" required="required" name="firstname" id="firstname" placeholder="Imię"></label>
  8. </div>
  9. <div><label for="date">Data urodzenia:
  10. <input type="text" required="required" name="date" id="date" placeholder="MM/DD/RRRR"</label>
  11. </div>
  12. <div><input type="submit" value="Wyślij"></div>
  13. </form>
  14. </body>
  15. </html>


  1. <?php
  2. $firstName = $_POST['firstname'];
  3. $Date = $_POST['date'];
  4. if (bool checkdate ( int $month , int $day , int $year )) {
  5. echo "Data jest poprawna";
  6. } else {
  7. echo "Data jest niepoprawna";
  8. }
  9. ?>


Pojawia się błąd: Parse error: syntax error, unexpected T_STRING in /data.php on line 4

Czy ktoś może pomóc i powiedzieć co jest nie tak? Szukałem już chyba wszędzie i nie mogę dojść co nie tak.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 4.10.2025 - 01:20