Search the Community
Showing results for tags 'reload'.
-
I have multiple divisions on my page.. what happens is by having next and previous buttons on my page i can browse thru the divisions... now i have save and delete on each page, i enter some values in the textboxes of the respective divs and they get saved or deleted.. i want to refresh those textboxes after saving or deleting, as the textboxes retrieve the values from database and show as their values.. now i don't want to refresh the page as i would have to start again from the first div even i was on lets say 55th div... is there a way that the textbox values can be refresh on lets say a refresh button or the whole division gets refreshed... all i want is the textboxes to be updated to the recent value without the whole page being refreshed... any help would be welcome..
- 1 reply
-
- div
- buttonclick
-
(and 3 more)
Tagged with:
-
I have HTML form linked with MYSQL database via PHP. If I submit this form, values will save in MYSQL database but not load into form. I see there old values so I have to refresh page to see desired values. I would like to see new values at form submission. *** I solved it when i put header("Location: edit.php?page=zakladni_udaje.php") ( = same as form action) on THE END OF ISSET form submit, it worked fine but I cant print message about success or fail after submiting. <?php ob_start(); session_start(); ?> <form action="edit.php?page=zakladni_udaje.php" method="post"> <?php $con = mysql_connect("localhost", "mairichovci", "ak41801") or die("Nelze se připojit k MySQL: " . mysql_error()); mysql_select_db("mairichovci") or die("Nelze vybrat databázi: ". mysql_error()); if($_SESSION['id'] > 0){ $profil_pomocny = mysql_query("SELECT * from profil where id=".$_SESSION['id'], $con); $profil = MySQL_Fetch_Assoc($profil_pomocny); $or_pomocny = mysql_query("SELECT * from osobaky where id=".$_SESSION['id'], $con); $or = MySQL_Fetch_Assoc($or_pomocny); $zobraz_pomocny = mysql_query("SELECT * from zobraz where id=".$_SESSION['id'], $con); $zobraz = MySQL_Fetch_Assoc($zobraz_pomocny); $id = $_SESSION['id']; $fce = $_POST['fce']; $email = $_POST['email']; $tel = $_POST['tel']; $position = $_POST['position']; $home = $_POST['home']; $omne = $_POST['omne']; if( isset ($_POST['uloz'])): $sql = "UPDATE profil SET fce = '$fce', email = '$email', tel = $tel, position = '$position', home = '$home', omne = '$omne' WHERE id = '$id'"; if (!mysql_query($sql)): die('Chyba: ' . mysql_error()); else: $message = "Údaje byly uloženy"; endif; mysql_close(); endif; echo '<div id="message">'.$message.'</div>'; ?> <table style = "margin-top: -1px" align="center" class="tabulka"> <tr> <td width="40%">Funkce:</td> <td><input type="text" name="fce" placeholder = "(např. Běžec - 800m, 1500m a delší)" maxlength="35" size="48" value="<?php echo $profil['fce']; ?>" class="vstupy" style="width: 350px"></td> </tr> <tr> <td></td> <td><input type="submit" name="uloz" value="Ulož" class="tlacitko2" style="width: 350px; margin-left:4px"></td> </tr> </table> </form> <?php } else{header("Location: prihlas.php");} ob_end_flush(); ?> Can anybody help me? Thanks in advance