close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Updates removes \ character from field data

Thread began 2/04/2015 6:01 pm by Jack Stockton | Last modified 2/06/2015 4:32 pm by Jason Byrnes | 793 views | 11 replies |

Jack Stockton

Updates removes \ character from field data

I have a field on my form that contains the name of a SQL server, such as 10.169.1.139\GTS. When I use the generated update form the \ will be removed, so that it is now 10.169.1.139GTS. How can I stop this behavior.

Sign in to reply to this post

Ray BorduinWebAssist

What server behavior are you using for the update? Please include a copy of your page for us to review and we can determine the proper work around for this issue.

Sign in to reply to this post

Jack Stockton

See attached file

Sign in to reply to this post

Jason ByrnesWebAssist

what is the name of the form field that passes the \ character? you could use code at line 1 of the update page to convert the \ to \\ which is the escape character, for example:

<?php
if(isset($_POST["field_name"])) {
str_replace("\\","\\\\",$_POST["field_name"]);
}
?>
Sign in to reply to this post

Jack Stockton

How would I use that? Many of the fields on the form could have a \ in the data.

An example field with the problem is the DB_LX, it colud have the value 10.169.1.139\GTS in it.

<input id="DB_LX" name="DB_LX" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("AccountWebupdate","DB_LX"):"".$row_WADAAccountWeb["DB_LX"]."")); ?>" class="formTextfield_Medium" tabindex="21" title="Please enter a value." />


Would the $WA_fieldValuesStr have to be updated for each field?

$WA_AB_Split . "".((isset($_POST["DB_LX"]))?$_POST["DB_LX"]:"") ."" .

Sign in to reply to this post

Jason ByrnesWebAssist

no, create a code black for each element at line 1:

<?php
if(isset($_POST["DB_LX"])) {
str_replace("\\","\\\\",$_POST["DB_LX"]);
}
?
Sign in to reply to this post

Jack Stockton

What do you mean line 1.

I tried putting the code at the top and I tried before the generated // WA DataAssist Update code. Still strips \, but now an error
Warning: Cannot modify header information - headers already sent by

Sign in to reply to this post

Jason ByrnesWebAssist

the very first line of code. line 1.

the headers already sent error means there is white space between php code blocks.

Sign in to reply to this post

Jack Stockton

Okay no error, but the \ is still being removed. Here is the header

Sign in to reply to this post

Jason ByrnesWebAssist

oops, sorry, i had incomplete syntax.

<?php if(isset($_POST["DB_LX"])) {
/* Workaround to support \ characters */
str_replace("\\","\\\\",$_POST["DB_LX"]);
} ?>

should be:
<?php if(isset($_POST["DB_LX"])) {
/* Workaround to support \ characters */
$_POST["DB_LX"] = str_replace("\\","\\\\",$_POST["DB_LX"]);
} ?>

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...