Jump to content

Search the Community

Showing results for tags 'submission'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.