I want to store Spanish characters in SQL (á, é, í, ó, ú, ü, ñ, ¿, ¡).
Consider the following query:
INSERT INTO students (name) VALUES('áéíóú')
When I run the query in phpMyAdmin the characters are stored correctly.
However, when I run the query from my php code they are stored as áéÃóú
Here is the relevant code:
<?php
...
$query = "INSERT INTO students (name) VALUES('áéíóú')";
?>