On 10/10/07, Don Proshetsky <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a field in which a user inputs a Windows style directory path, hence
> using backslashes and not forward slashes.
>
> Example: c:\qb\data\mydatadile.qbw
>
> However, when the use clicks update, what gets saved is:
> c:qbdatamydatadile.qbw
>
> Does anyone know if there is a work around?
How are you checking the value actually saved in the database -
through another PHP script, or directly via the MySQL
command-line-interface? If you're using another script to view the
value, it might be the display script that is screwing up, not the
save script - check the value directly with the MySQL CLI client.
HTH-
James
>
> The backslashes mysteriously are stripped. I use the following function to
> wrap each variable that's saved in the MySQL table:
>
> function update_database($value)
> {
> // Addslashes
> if (!(get_magic_quotes_gpc())) {
> $value = addslashes($value);
> }
> // Quote if not a number or a numeric string
> if (!is_numeric($value)) {
> $value = mysql_real_escape_string($value);
> }
> return $value;
> }
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php