sql >> Database teknologi >  >> RDS >> Mysql

hvordan man tillader brugere, der er logget på, at OPDATERE/REDIGERE deres profilindstillinger/oplysninger

kort version;)

HTML fil:

<form action="./change.php" method="post"> 
    Nickname: <input type="text" name="nickname"><br />
    Country: <input type="text" name="country"><br />
    Date of birth: <input type="text" name="date_of_birth"><br />
    Gender: <input type="text" name="gender"><br />
    Motto: <input type="text" name="motto"><br />
    Bio: <input type="text" name="bio"><br />
    <input type="submit" value="Submit">
</form>

change.php:

<?php
    function filter($date)
    {
        return trim(htmlspecialchars($date));
    }

    $nickname = filter($_POST['nickname'])
    $country = filter($_POST['country'])
    $date_of_birth = filter($_POST['date_of_birth'])
    $gender = filter($_POST['gender'])
    $motto = filter($_POST['motto'])
    $bio = filter($_POST['bio'])

    if (isUserLogIn)
    {
        //SQL update query
    }

?>



  1. Sammenligning af datoer i Oracle SQL

  2. Hvordan indsætter man utf-8 mb4 karakter (emoji i ios5) i mysql?

  3. SQL Server Process Queue Race Condition

  4. Hvad er nyt i MariaDB Server 10.5?