Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP, HTML]Formularz przez POST
-baboshka-
post
Post #1





Goście







Mam taką oto stronę PHP:

  1. <?php
  2. $numer = '1234567';
  3. $pass = 'haslo123';
  4. ?>
  5. <form action="https://secure.tibia.com/account/?subtopic=accountmanagement" method="post">
  6. <input type="hidden" name="ACCOUNTLOGIN_ACCOUNTID" value="xxx">
  7. <input type="hidden" name="ACCOUNTLOGIN_PASSWORD" value="xxx">
  8. <input name="Submit" src="sbutton_submit.gif" border="0" height="18" type="image" width="120">
  9. </form>


Chciałbym żeby w miejsce pierwszego value wskakiwało $numer a w drugiego $pass. Nieznam się bardzo na składni więc jak mam to zrobić??
  1. value="<?php &numer ?>"
nie idzie
Go to the top of the page
+Quote Post
remik09
post
Post #2





Grupa: Zarejestrowani
Postów: 102
Pomógł: 10
Dołączył: 25.12.2005
Skąd: Ruda Śląska

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


  1. <?php
  2. $numer = '1234567';
  3. $pass = 'haslo123';
  4. <form action="https://secure.tibia.com/account/?subtopic=accountmanagement" method="post">
  5. <input type="hidden" name="ACCOUNTLOGIN_ACCOUNTID" value="'.$numer.'">
  6. <input type="hidden" name="ACCOUNTLOGIN_PASSWORD" value="'.$pass.'">
  7. <input name="Submit" src="sbutton_submit.gif" border="0" height="18" type="image" width="120">
  8. </form>
  9. ';
  10. ?>


nie rozumiem problemu
Go to the top of the page
+Quote Post
-bicaj-
post
Post #3





Goście







A jak zrobic żeby po kliknięciu submit strona otwierała się w nowym oknie, a nie w tym samym?
Go to the top of the page
+Quote Post
piotrooo89
post
Post #4


Newsman


Grupa: Moderatorzy
Postów: 4 005
Pomógł: 548
Dołączył: 7.04.2008
Skąd: Trzebinia/Kraków




To może ustalić sobie w

  1. <form action="https://secure.tibia.com/account/?subtopic=accountmanagement" method="post">


w action dokładnie dajesz sobie przekierowanie do nowej strony.

Ja bym tak zrobił.

Ten post edytował piotrooo89 21.04.2008, 19:58:25
Go to the top of the page
+Quote Post
batman
post
Post #5





Grupa: Moderatorzy
Postów: 2 921
Pomógł: 269
Dołączył: 11.08.2005
Skąd: 127.0.0.1




Jeśli chcesz otworzyć w nowym oknie przeglądarki, to używasz atrybutu target="_blank". Nie pamiętam, czy jest on zgodny ze specyfikacją.
Go to the top of the page
+Quote Post
-obmiron-
post
Post #6





Goście







Tak właśnie jest zrobione, a mimo to strona nie otwiera sie w nowym oknie. W HTMLu jest parametr
  1. target="blank"
ale tutaj nie mam pojęcia
Go to the top of the page
+Quote Post
batman
post
Post #7





Grupa: Moderatorzy
Postów: 2 921
Pomógł: 269
Dołączył: 11.08.2005
Skąd: 127.0.0.1




Przed blank jest znak podkreślenia: _
Kod
target="_blank"
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: 23.08.2025 - 09:46