0

Now i got a register form that uploads a piece of info to my database table, but when i check for Æ Ø Å its messed up! this is my upload script:

<?php
mysql_query("SET NAMES 'utf8'");
$con = mysqli_connect('localhost', 'root', '', 'errors');
if(isset($_POST['submit'])) {
    session_start();
    $fname = $_POST['fname'];
    $username = $_POST['username'];
    $password = $_POST['password'];
    $email = $_POST['email'];
    $about = $_POST['about'];
    $date = $_POST['date'];
    mysql_query("SET NAMES 'utf8'");
    $sql = $con->query("INSERT INTO `usersystems` (`userid`, `fname`, `username`, `password`, `email`, `about`, `birth`) VALUES (NULL, '{$fname}', '{$username}', '{$password}', '{$email}', '{$about}', '{$date}');");
    header('Location: login.php');
?>

So now, how do i make it so the table actually allow those letters?

Marc Delisle
  • 8,879
  • 3
  • 29
  • 29

0 Answers0