Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]PHP syntax error, unexpected T_ELSE
assasin
post
Post #1





Grupa: Zarejestrowani
Postów: 196
Pomógł: 0
Dołączył: 13.11.2008

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


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. ?>


Ten post edytował assasin 2.03.2009, 21:20:34
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
erix
post
Post #2





Grupa: Moderatorzy
Postów: 15 467
Pomógł: 1451
Dołączył: 25.04.2005
Skąd: Szczebrzeszyn/Rzeszów




Strzelam, że popsułeś cudzysłowy.

Popraw bbcode, to zapewne zobaczysz.


--------------------

ZCE :: Pisząc PW załączaj LINK DO TEMATU i TYLKO w sprawach moderacji :: jakiś błąd - a TREŚĆ BŁĘDU? :: nie ponaglaj z odpowiedzią via PW!
Go to the top of the page
+Quote Post
wookieb
post
Post #3





Grupa: Moderatorzy
Postów: 8 989
Pomógł: 1550
Dołączył: 8.08.2008
Skąd: Słupsk/Gdańsk




{ powinno byc raczej po if. Zreszta kazdy edytor php ci to znajdzie...


--------------------
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 19.08.2025 - 05:27