Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP] Problem ze składnią, Bardzo prosze o pomoc
iksior
post
Post #1





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 30.01.2010

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


Witam ! mam taki problem... ściągnąłem skrypt pewnej gry niestety/oczywiście jest pełna błędów... prosze o wskazanie błędu i ew. go poprawienie w poniższym kodzie
  1. <b>Username:</b> <?php=$player->username?><br />
  2. <b>Email:</b> <?php=$player->email?><br />
  3. <b>Registered:</b> <?php=date("F j, Y, g:i a", $player->registered)?><br />
Pozdrawiam Iksior. @Down Wielkie dzięki nie pomyślałem o echach (IMG:style_emoticons/default/haha.gif) . Oczywiście pomógł (IMG:style_emoticons/default/exclamation.gif)

Błąd nr 2
  1. <tr><td width="40%"><b>Username</b>:</td><td><input type="text" name="username" value="<?php=$_POST['username'];?>" /></td></tr>


Błąd nr 3

Notice: Undefined index: act in
  1. switch($_GET['act'])
  2. {
  3. case "buy":
  4. if (!$_GET['id']) //No item ID
  5. {
  6. header("Location: shop.php");
  7. break;
  8. }


Ten post edytował iksior 30.01.2010, 03:39:07
Go to the top of the page
+Quote Post
patryczakowy
post
Post #2





Grupa: Zarejestrowani
Postów: 420
Pomógł: 44
Dołączył: 22.10.2008

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


  1. <b>Username:</b> <?php echo $player->username;?><br />
  2. <b>Email:</b> <?php echo $player->email;?><br />
  3. <b>Registered:</b> <?php echo date("F j, Y, g:i a", $player->registered);?><br />


Nie wiem czy będzie działać jak są błędy w tych klasach to pewnie niebędzie na przyszłość podaj jakie błędy ci wywala

Ten post edytował patryczakowy 30.01.2010, 02:39:07
Go to the top of the page
+Quote Post
screv
post
Post #3





Grupa: Zarejestrowani
Postów: 46
Pomógł: 0
Dołączył: 3.08.2009

Ostrzeżenie: (10%)
X----


  1. <tr><td width="40%"><b>Username</b>:</td><td><input type="text" name="username" value="<?php $_POST['username']; ?>" /></td></tr>


Spróbuj tego ; )
Go to the top of the page
+Quote Post
iksior
post
Post #4





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 30.01.2010

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


Niestety screv to nic nie daje nadal w formularzu pojawia mi się
  1. <?php=$_POST['username']; ?>
oto screen: (IMG:http://img62.imageshack.us/img62/7538/phpo.jpg)

Błąd poprawiony teraz ten kod wygląda następująco
  1. <input type="text" name="username" value="<?php if(count($_POST)>0) echo $_POST['username']; ?>" />


Ten post edytował iksior 30.01.2010, 13:27:27
Go to the top of the page
+Quote Post

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: 2.10.2025 - 19:52