Dołącz do zespołu ekspertów! Backend lub Frontend Developer?

Sprawdź najnowsze oferty pracy naszego partnera - 8lines.io!

Generator nie generuje tekstu

Założony przez  PitagoraS.

Strona WWW: http://vs-astra.xaa.pl/generatorzlecen.php
Pełny opis problemu:
Witam. Mam taki problem, że jak wypełnię te pola i jak wcisnę Generuj! to nie generuje :?
Tutaj daje kod:
<?php
if(empty($_POST["rozliczenie"])){ ?>
<form method="post">
<center>
<br>Stanowisko: </br>
<select type="text" name="stanowisko">
   <option>Spedytor</option>  
</select>
<br>Nick spedytora:
</br> <input type="text" name="nick" size="30"  />
<br>Numer zlecenia:
</br> <input type="text" name="numerzlecenia" size="30"  />
<br>Kierowca:
</br> <input type="text" name="kierowca" size="30"  />
<br>Data wystawienia rozpiski:
</br> <input type="text" name="data1" size="30"  />
<br>Data oddania rozliczenia:
</br> <input type="text" name="data2" size="30"  />
<p><br><DIV ALIGN=CENTER>Miejsce zaladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Miejsce rozladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Ładunek:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Waga:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</br> <input type="text" name="zaladunek1" size="30"  />
<input type="text" name="rozladunek1" size="30"  />
<input type="text" name="ladunek1" size="30"  />
<input type="text" name="waga1" size="30"  />
<br>Miejsce zaladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Miejsce rozladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Ładunek:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Waga:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</br> <input type="text" name="zaladunek2" size="30"  />
<input type="text" name="rozladunek2" size="30"  />
<input type="text" name="ladunek2" size="30"  />
<input type="text" name="waga2" size="30"  />
<br>Miejsce zaladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Miejsce rozladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Ładunek:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Waga:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</br> <input type="text" name="zaladunek3" size="30"  />
<input type="text" name="rozladunek3" size="30"  />
<input type="text" name="ladunek3" size="30"  />
<input type="text" name="waga3" size="30"  />
<br>Miejsce zaladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Miejsce rozladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Ładunek:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Waga:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</br> <input type="text" name="zaladunek4" size="30"  />
<input type="text" name="rozladunek4" size="30"  />
<input type="text" name="ladunek4" size="30"  />
<input type="text" name="waga4" size="30"  />
<br>Miejsce zaladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Miejsce rozladunku:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Ładunek:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Waga:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</br> <input type="text" name="zaladunek5" size="30"  />
<input type="text" name="rozladunek5" size="30"  />
<input type="text" name="ladunek5" size="30"  />
<input type="text" name="waga5" size="30"  /></DIV>
<p>
<br>Ilosc pieniedzy na inne wydatki:
</br> <input type="text" name="inne" size="30"  />
<br><input type="submit" value="Generuj!" />
<input type="reset" value="Wyszysc!" />
</br>
<br><br><br>
</form>
</p>
<?php }else{
$stanowisko=$_POST["stanowisko"];
$nick=$_POST["nick"];
$kierowca=$_POST["kierowca"];
$data1=$_POST["data1"];
$data2=$_POST["data2"];
$nrzlecenia=$_POST["nrzlecenia"];
$zaladunek1=$_POST["zaladunek1"];
$rozladunek1=$_POST["rozladunek1"];
$ladunek1=$_POST["ladunek1"];
$waga1=$_POST["waga1"];
$zaladunek2=$_POST["zaladunek2"];
$rozladunek2=$_POST["rozladunek2"];
$ladunek2=$_POST["ladunek2"];
$waga2=$_POST["waga2"];
$zaladunek3=$_POST["zaladunek3"];
$rozladunek3=$_POST["rozladunek3"];
$ladunek3=$_POST["ladunek3"];
$waga3=$_POST["waga3"];
$zaladunek4=$_POST["zaladunek4"];
$rozladunek4=$_POST["rozladunek4"];
$ladunek4=$_POST["ladunek4"];
$waga4=$_POST["waga4"];
$zaladunek5=$_POST["zaladunek5"];
$rozladunek5=$_POST["rozladunek5"];
$ladunek5=$_POST["ladunek5"];
$waga5=$_POST["waga5"];
$inne=$_POST["inne"];
$bonus=$_POST["bonus"];
echo '<center> Wygenerowany tekst:<br/>
<textarea rows="22" cols="50">
<center>[b]Stanowisko: [/b] '.$stanowisko.'
[b]Nick spedytora: [/b] '.$nick.'
[b]Numer zlecenia: [/b] '.$numerzlecenia.'
[b]Kierowca: [/b] '.$kierowca.'
[b]Data wystawienia rozpiski: [/b] '.$data1.'
[b]Data oddania rozliczenia: [/b] '.$data2.'
'.$zaladunek1.' --> '.$rozladunek1.' - '.$ladunek1.' - '.$waga1.'
'.$zaladunek2.' --> '.$rozladunek2.' - '.$ladunek2.' - '.$waga2.'
'.$zaladunek3.' --> '.$rozladunek3.' - '.$ladunek3.' - '.$waga3.'
'.$zaladunek4.' --> '.$rozladunek4.' - '.$ladunek4.' - '.$waga4.'
'.$zaladunek5.' --> '.$rozladunek5.' - '.$ladunek5.' - '.$waga5.'
[b]Ilosc pieniedzy na inne wydatki: [/b]'.$inne.'</center>
'.$bonus.'
</textarea><br/><br/>
</center>';
} ?>
Spróbuj
<form method="post">
zamienić na
<form method="post" action="nazwa_twoje_pliku.php">
Nie działa :(
Co oznacza
<?php }else{
Te }else{ ?
Matslom usunąłem to i zobacz co sie zrobiło http://vs-astra.xaa.pl/generatorzlecena.php :/
Usunąłeś tylko }else{ ?
Tak, zostawiłem to
<form method="post">
i usunąłem }else{
@Matslom
"Else {" to druga część instrukcji warunkowej. Calosc wyglada tak:
if (warunek){co ma zostać wykonane}
Else{co ma zostac wykonane jezeli warunek nie jest spelniony}.
@up: Wiem, co to else i za co odpowiada. Znam PHP na tym poziomie...
Czy to
$zaladunek2=$_POST["zaladunek2"];
Nie powinno wyglądać
$zaladunek2 = $_POST["zaladunek2"];
Poza tym ten formularz to jakaś pomyłka jest, wszystko zlepione do niczego nie można dojść...
@up
W takim razie, nie mam pojęcia skąd Twoje pytanie w poście #4. Co do formularza to faktycznie - całość jest bardzo nieczytelna, brakuje jakichkolwiek komentarzy.



Użytkownicy przeglądający ten wątek:

2 gości