Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problem 500 w kodzie php
Forum PHP.pl > Forum > PHP
www.aukcje.fm
Witam,

Mamy problem 500

PHP Parse error: syntax error, unexpected '(', expecting T_STRING in /data/xxxxxxx/index.php on line 38


  1. <?php
  2.  
  3. require_once './inc.php5';
  4. header('Content-Type: text/html; charset=utf-8');
  5.  
  6. //session
  7. $session_exists = mysql_num_rows(mysql_query("SELECT * FROM session WHERE ip='".$_SERVER['REMOTE_ADDR']."'"));
  8. if (!$session_exists) {
  9. mysql_query("INSERT INTO session (ip, session_time) VALUES ('".$_SERVER['REMOTE_ADDR']."', '".time()."')");
  10. } else {
  11. mysql_query("UPDATE session SET session_time='".(time()+300)."' WHERE ip='".$_SERVER['REMOTE_ADDR']."'");
  12. }
  13.  
  14. //save email
  15. if ($_GET['email']) {
  16. $email_exists = mysql_num_rows(mysql_query("SELECT * FROM newsletter WHERE email='".$_GET['email']."'"));
  17. if ($email_exists) {
  18. $ERROR = "Your email already exists";
  19. } else {
  20. if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $_GET['email'])) {
  21. $ERROR = "Wrong email format!";
  22. } else {
  23. $result = mysql_query("INSERT INTO newsletter (email) VALUES ('".$_GET['email']."')");
  24. $ERROR = ($result) ? "Your email has been added" : "";
  25. }
  26. }
  27. }
  28.  
  29.  
  30. if (isset($_POST['action']) && $_POST['action'] === 'shoutbox') {
  31. $name = DB::RealEscapeString(addslashes(htmlentities(strip_tags(substr(trim($_POST['name']), 0, 10)), null, 'utf-8')));
  32. $text = DB::RealEscapeString(addslashes(htmlentities(strip_tags(substr(trim($_POST['text']), 0, 80)), null, 'utf-8')));
  33.  
  34. if ($name && $text) {
  35. DB::Query("INSERT INTO {shoutbox_main} VALUES(NULL, UNIX_TIMESTAMP(), '$name', '$text')");
  36. }
  37.  
  38. goto('index.php');
  39. }
  40.  
  41. $random_objects = array();
  42. $links = array();
  43.  
  44. $s = 'all';
  45. if (!empty($_GET['s'])) {
  46. $s = addslashes(strip_tags(trim($_GET['s'])));
  47. }
  48.  
  49. $l = 'all';
  50. if (!empty($_GET['l'])) {
  51. $l = addslashes(strip_tags(trim($_GET['l'])));
  52. }
  53.  
  54. if ($config['enable_random_objects']) {
  55.  
  56. $rand_obj = array();
  57.  

wookieb
goto to słówko zarezerwowane.
batman
Forum nie parser. Zamykam.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.