Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Parse error - POMOCY!
-raszey-
post 15.05.2008, 13:55:59
Post #1





Goście







Modyfikuje skrypt bazy hotelowej. Próbuje dokonac następującej poprawki. W przypadku gdy nazwa kategorii (ProprtyType) będzie "Nowe obiekty" wówczas wyświetli sie tabelka z pewnymi informacjami.
A tak wygląda kod:
  1. <?
  2. $i = $_GET['i'];
  3. $f = $_GET['f'];
  4.  
  5.  
  6.  
  7.  
  8. require_once("conn.php");
  9. require_once("includes.php");
  10.  
  11. if(empty($_GET[id]))
  12. {
  13. header("location:index.php");
  14. exit();
  15. }
  16.  
  17. $q1 = "select * from re2_agents, re2_listings where re2_listings.ListingID = '$_GET[id]' and re2_listings.AgentID = re2_agents.AgentID ";
  18. $r1 = mysql_query($q1) or die(mysql_error());
  19. $a1 = mysql_fetch_array($r1);
  20.  
  21.  
  22.  
  23. if(empty($i) || $i == '1')
  24. {
  25. $Image1 = "bg_info2.gif";
  26.  
  27. $desc = nl2br($a1[DetailedDesc]);
  28.  
  29. $MyPrice = number_format($a1[Price], 2, ".", "'");
  30.  
  31. $ShowInfo .= "<table border=0 align=center width=500>
  32. <tr>
  33. <td width=500 height=19 valign=top><font size=3><b>$a1[hotelname], $a1[PropertyType]</font></b></td>
  34. </tr>
  35. <tr>
  36. <td bgcolor=#D2B48C width=500 height=22 valign=top><font size=2 color=white><b>Informacje podstawowe:</font></b></td>
  37. </tr>
  38. <center>
  39. if($a1['PropertyType']=="Nowe oferty")
  40. {
  41. echo '<tr>
  42. <td bgcolor=#efefef width=500 valign=top align=center>adres: <b>$a1[address]</b></td>
  43. </tr>';
  44. }
  45. ?>

Pokuazuje następujący błąd:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/ekr44347/public_html/test/info.php on line 39

Gdzie jest błąd questionmark.gif

Następnym razem proszę używać poprawnego bbcode. /kszychu/
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
nospor
post 15.05.2008, 13:59:52
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




uzywaj bbcode!!

Jak zaczynasz tekst, to nalezy go zamknac. źle:
Kod
$zm = 'sadasdasd
sasdas TU NIE ZAMKNALES

Dobrze:
  1. <?php
  2. $zm = 'sadasdasd
  3. sasdas TU JA ZAMKNALEM';
  4. ?>


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

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

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 Wersja Lo-Fi Aktualny czas: 18.07.2025 - 06:58