Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]$_POST
szymon202
post 26.05.2015, 19:51:06
Post #1





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 13.08.2013

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


Witajcie mam taki formularz
  1. <form action="https://secure.przelewy24.pl/" method="post" class="form" id="fformn">
  2. <input type="hidden" class="form-control" name="p24_session_id" value="<?php echo $_SESSION["idd"]; ?>" />
  3. <input type="hidden" class="form-control" name="p24_id_sprzedawcy" value="35188" />
  4. <input type="hidden" class="form-control" name="p24_return_url_error" value="<?php echo $protocol.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']."?error"; ?>" />
  5. <input type="hidden" class="form-control" name="p24_return_url_ok" value="<?php echo $protocol.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']."?check"; ?>" />
  6. <p>
  7. <input type="text" class="form-control" name="p24_kwota" value="1" />
  8. </p>
  9. <input type="hidden" class="form-control" name="p24_opis" value="Doładowanie portfela - <?php print($profile["email"]); ?>" />
  10. <input type="hidden" class="form-control" name="p24_email" value="<?php print($profile["email"]); ?>" />
  11. <input name="send" class="form-control" value="wyślij" type="submit" />
  12. </form>


Kwota musi być podana w groszach i teraz nie wiem jak zrobić, aby pomnożyć p24_kwota przez 100.
Go to the top of the page
+Quote Post
robertpiaty
post 26.05.2015, 19:59:27
Post #2





Grupa: Zarejestrowani
Postów: 113
Pomógł: 18
Dołączył: 7.10.2007
Skąd: Pruszków

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


  1. (int)$_POST['p24_kwota'] * 100;



--------------------
Go to the top of the page
+Quote Post
szymon202
post 26.05.2015, 20:01:36
Post #3





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 13.08.2013

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


Cytat(robertpiaty @ 26.05.2015, 20:59:27 ) *
  1. (int)$_POST['p24_kwota'] * 100;


A gdzie to dać?
Go to the top of the page
+Quote Post
robertpiaty
post 26.05.2015, 20:07:07
Post #4





Grupa: Zarejestrowani
Postów: 113
Pomógł: 18
Dołączył: 7.10.2007
Skąd: Pruszków

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


Nie zwróciłem uwagi - masz dostęp do kodu na secure.przelewy24.pl? Bo tam strzelasz formularzem.


--------------------
Go to the top of the page
+Quote Post
szymon202
post 26.05.2015, 20:07:48
Post #5





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 13.08.2013

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


Cytat(robertpiaty @ 26.05.2015, 21:07:07 ) *
Nie zwróciłem uwagi - masz dostęp do kodu na secure.przelewy24.pl? Bo tam strzelasz formularzem.


Nie mam. Wysyłają mi się tam dane z inputów, a potem weryfikuję.
Go to the top of the page
+Quote Post
robertpiaty
post 26.05.2015, 20:36:14
Post #6





Grupa: Zarejestrowani
Postów: 113
Pomógł: 18
Dołączył: 7.10.2007
Skąd: Pruszków

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


  1. <?php echo $kwota * 100; ?>


To wstawiasz w linii 7 zamiast "1" w atrybucie value. Za $kwota wstawiasz kwotę jaką masz w złotówkach.


--------------------
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: 27.04.2025 - 06:13