I’m using PHP, jQuery and mySQL to build an admin site to my webpage.
In one of parts of this admin section, I use a <textarea> element to write several lines.
I’m Spanish and I use á é í ó ú and ñ letters.
I’m looking for any script that replace á to á
Also I’m still having problems to send <textarea> content to mySQL.
<form action="this_file.php" method="POST">
<textarea class="inputcat" type="text" cols="40" rows="5" name="content"></textarea>
<input type="submit" value="upload text" name="submit">
</form>
<?php
//allow sessions to be passed so we can see if the user is logged in
session_start();
//connect to the database so we can check, edit, or insert data to our users table
$con = mysql_connect('localhost', 'user', 'pass') or die(mysql_error());
$db = mysql_select_db('dbname', $con) or die(mysql_error());
if(isset($_POST['submit'])){
//insert the row into the database
$contenido = $_POST['content'];
$SQL = "INSERT INTO table1 (`ct`) VALUE('" .$contenido. "')";//edited sytanx
$result = mysql_query($SQL) or die(mysql_error());
}
?>
The error is:
Unknown column 'ìmg' in 'field list'
fixed error.
last thing is to replace áéíóú and ñ letter when user request mysql to read content from a table. áéíóú are in this table and i wanna to replace in real time when user request that content
try this.
php