Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]PHP syntax error, unexpected T_ELSE
Forum PHP.pl > Forum > Przedszkole
assasin
Po wejściu na stronke wyskakuje :
Parse error: syntax error, unexpected T_ELSE in /srv/www/vhosts/xn--szkoagm-qjb.pl/httpdocs/userbar/index.php on line 44
szukałem ale nie umie znaleźć błędu;/
  1. <?
  2. {
  3. if(isset($_GET['name']))
  4.     error_reporting(E_ALL);
  5.     include_once("config.php");
  6.     include_once("core/dbsimple/Generic.php");
  7.     include_once("core/player_data.php");
  8.  
  9.  
  10.     $cDB = DbSimple_Generic::connect($config["cdb"]);
  11.     $cDB->setErrorHandler('databaseErrorHandler');
  12.     $cDB->query("SET NAMES ?",$config["db_encoding"]);
  13.  
  14.     $charname = (get_magic_quotes_gpc())? $_GET["name"] : mysql_escape_string($_GET["name"]);
  15.     $charname = urldecode($charname);
  16.    
  17.     $row = $cDB->selectRow("SELECT * FROM `characters` WHERE `name`=? ",$charname);
  18.     if (!$row) exit("I can't find <b>".$charname."</b> on the database!");
  19.  
  20.     $host = "http://www.yourhost.com/userbar"; // Change this to your host
  21.     $url = $host.$dir.$row['name'].".png";
  22.     $urlm = $host.$dir."mini/".$row['name'].".png";
  23.     $reset = $host.$dir;
  24.    
  25. echo '
  26. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  27. <tr><td>
  28. <div align="center">
  29. <img src="'.$url.'"><br />
  30. <table>
  31. <tr><td width="180px">Userbar:</td><td><input type="text" style="width:400px;text-align:center" value="'.$host.'/userbar/ub.php?name='.$charname.'"></td></tr>
  32. <tr><td width="180px">Userbar (Forum Link):</td><td><input type="text" style="width:400px;text-align:center" value="[img]'.$url.'[/img]"></td></tr>
  33. </table><br />
  34. <img src="'.$urlm.'"><br />
  35. <table>
  36. <tr><td width="180px">Mini Userbar:</td><td><input type="text" style="width:400px;text-align:center" value="'.$host.'/userbar/ub_mini.php?name='.$charname .'"></td></tr>
  37. <tr><td width="180px">Mini Userbar (Forum Link):</td><td><input type="text" style="width:400px;text-align:center" value="[img]'.$urlm.'[/img]"></td></tr>
  38. <tr align="center"><td colspan="2"><br /><input type="submit" value="Submit" onclick="java script:location.href='.$host.'"></td></tr>
  39. </table>
  40. </div>
  41. </div>
  42. </td></tr></table>
  43. ';
  44. }else{
  45. echo '
  46. <b>Put in the caracter name to get the links to the generated avatar and signature:</b><br><br>
  47. <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
  48. <FORM ACTION="" METHOD="GET">
  49. <input type="hidden" name="page" value="10" />
  50. <INPUT name="name" TYPE="text">
  51. <INPUT TYPE="submit" VALUE="Find Character">
  52. </FORM>
  53. <br>
  54. '; } echo '
  55. <HR>';
  56. ?>
erix
Strzelam, że popsułeś cudzysłowy.

Popraw bbcode, to zapewne zobaczysz.
wookieb
{ powinno byc raczej po if. Zreszta kazdy edytor php ci to znajdzie...
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.