Date: 11/09/00
- Next message: obo: "Re: [PHP-DB] Form Input Type"
- Previous message: Ajit Dixit: "Re: [PHP-DB] The set_time_limit() in PHP...."
- In reply to: Paul DuBois: "Re: [PHP-DB] I`m not able to store "`s in mySQL!!!!"
- Next in thread: scottrus <email protected>: "Re: [PHP-DB] I`m not able to store "`s in mySQL!!!!"
- Reply: scottrus <email protected>: "Re: [PHP-DB] I`m not able to store "`s in mySQL!!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> At 11:14 AM +0100 11-08-2000, Trond Erling Hundal wrote:
> >Hi
> >I`m trying to store some info that the user puts in a textarea field, but
> >when I try to insert it into the table, MySQL only stores everything up
> >until it hits on a "...
> >I tried to use addslashes($info) before i stored it in the db, but that
> >didn`t help either...
> >Any ideas??? What am I not seeing here??
>
I don't know - it works for me! Here's a sample of code I use to insert a
textarea into a mySQL database:
...
<form>
....
<td width="32%" valign=top><font face="Arial">About:</font></td>
<td width="68%"><textarea rows=6 name=about cols=50></textarea>
</td>
</tr>
</table>
<input type=submit name=submit value="Submit">
</form>
$result=mysql_query("INSERT INTO printer (name, driver, description, about)
VALUES (\"$pname\", \"$drvname\", \"$desc\", \"$about\")", $db);
Some of the 'about' fields have quotes and double quotes in them, and these
are stored fine in the database (the about field is of type text rather than
varchar - I don't know if that's what makes the difference).
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: obo: "Re: [PHP-DB] Form Input Type"
- Previous message: Ajit Dixit: "Re: [PHP-DB] The set_time_limit() in PHP...."
- In reply to: Paul DuBois: "Re: [PHP-DB] I`m not able to store "`s in mySQL!!!!"
- Next in thread: scottrus <email protected>: "Re: [PHP-DB] I`m not able to store "`s in mySQL!!!!"
- Reply: scottrus <email protected>: "Re: [PHP-DB] I`m not able to store "`s in mySQL!!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

