mam problem z formularzem mianowicie gdy puszczam mu submit to strona zostanie przeładowana lecz dane na formularzu się nie zaktualizują, jakiś pomysł, żeby zrobić refresh i dodać komunikat? Próbowałem z header(Location:) lecz gdy wraca mi na docelową podstronę nie ma komunikatu, np. w echo.
<p> <form action="" method="POST"> <div class="col-md-6" style="padding-left:0px;"> <label> <strong>Imię:</strong><br /> <input type="text" class="form-control" name="firstname" value="<?php echo $session_option_row['firstname']; ?>" /> <br /> </label> <label> <strong>Nazwisko:</strong><br /> <input type="text" class="form-control" name="lastname" value="<?php echo $session_option_row['lastname']; ?>" /> <br /> </label> <label> <strong>Adres e-mail:</strong><br /> <input type="text" class="form-control" name="email" value="<?php echo $session_option_row['email']; ?>" /> <br /> </label> <label> <strong>Hasło:</strong><br /> <input type="password" class="form-control" name="password" value="" /> <br /> </label> </div> <div class="col-md-6" style="padding-right:0px;"> <label> <strong>Miasto:</strong><br /> <input type="text" class="form-control" name="town" value="<?php echo $session_option_row['town']; ?>" /> <br /> </label> <label> <strong>Ulica:</strong><br /> <input type="text" class="form-control" name="street" value="<?php echo $session_option_row['street']; ?>" /> <br /> </label> <label> <strong>Kod pocztowy:</strong><br /> <input type="text" class="form-control" name="postal_code" value="<?php echo $session_option_row['postal_code']; ?>" /> <br /> </label> <label> <strong>Poczta:</strong><br /> <input type="text" class="form-control" name="post_office" value="<?php echo $session_option_row['post_office']; ?>" /> <br /> </label> </div> <label> <input type="submit" class="btn btn-md btn-success" name="submit" value="Aktualizuj dane"> </label> </form> <?php $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $email = $_POST['email']; $password = $_POST['password']; $town = $_POST['town']; $street = $_POST['street']; $postal_code = $_POST['postal_code']; $post_office = $_POST['post_office']; $query = mysql_query("UPDATE users SET email='$email', password='$password', firstname='$firstname', lastname='$lastname', town='$town', street='$street', postal_code='$postal_code', post_office='$post_office' WHERE id='$id'"); } ?> </p>