Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Losowy element flash.
kurczak610
post
Post #1





Grupa: Zarejestrowani
Postów: 87
Pomógł: 2
Dołączył: 3.05.2009

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


Witam ponownie (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) P Mam taki skrypt:

  1. <?php
  2.  
  3.   $partie = $row_statistic[partie];
  4.   if($partie == 0) echo ("
  5.  $zdrapki=array('<EMBED src="moon.swf" width="250" height="100"></EMBED>','<EMBED src="moon_30.swf" width="250" height="100"></EMBED>','<EMBED src="moon_50.swf" width="250" height="100"></EMBED>');
  6.  
  7.  
  8.  
  9. do
  10. {
  11.   $los=rand(0,2);
  12.  
  13.   $zdrapka.=$zdrapki[$los];
  14.  
  15.   $i++;
  16. }
  17.  
  18. while($i<=0);
  19.  
  20. $lzdrapka = $zdrapka;
  21.  
  22.  
  23.  
  24. echo $lzdrapka;
  25.  
  26.  if($lzdrapka == '<EMBED src="moon.swf" width="250" height="100"></EMBED>') mysql_query("UPDATE users1 SET points=points+10 WHERE id=$_SESSION[userid]") or die(mysql_error());
  27.  if($lzdrapka == '<EMBED src="moon_30.swf" width="250" height="100"></EMBED>') mysql_query("UPDATE users1 SET points=points+30 WHERE id=$_SESSION[userid]") or die(mysql_error());
  28.  if($lzdrapka == '<EMBED src="moon_50.swf" width="250" height="100"></EMBED>') mysql_query("UPDATE users1 SET points=points+50 WHERE id=$_SESSION[userid]") or die(mysql_error());
  29.  
  30. mysql_query("UPDATE users1 SET partie=partie-1 WHERE id=$_SESSION[userid]") or die(mysql_error());
  31. ");
  32. ?>


Element sie losuje i dodaje pkty. Ale gdy dodałem
  1. <?php
  2. $partie = $row_statistic[partie];
  3.    if($partie == 0) echo ("
  4. ?>

Już pisze ze syntax error co tu poprawić? (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
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 - 05:06