close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Removing parts of email body

Thread began 7/06/2011 12:12 am by julie383376 | Last modified 8/11/2011 12:46 pm by julie383376 | 3173 views | 11 replies

Nathan69474

Hi Jason,

I've a quirky add-on question ... I'm trying to do the same only with the Security Question / Answer rather then cachup

<?php
if (($_SERVER["REQUEST_METHOD"] == "POST")) {
@session_start();
$removeArray = array();
$removeArray[] = "Security_Answer";
$removeArray[] = "captcha_x"; // I've tried removing this, but still get the numbers
$removeArray[] = "captcha_y"; // as above
$_SESSION['mailBody'] = "";
foreach($_POST as $pkey => $pval ){
if(!in_array($pkey,$removeArray)) {
$_SESSION['mailBody'] .= "".str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval):$pval))."<br />";
}
}
}
?>

The security answer correctly removes itself as does the field arrays but in the db I get an additional eg ... <br />33<br />4<br /> ... at the bottom of the db entry.

I've tested it 4 or 5 times and the 33's and 4's range from 33/35/38/39 or 4/11/12. There doesn't seem to a pattern to the numbers. The db entries numbers are 14-20 so it's not the emailID numbers, I've also compared it to the mins / seconds / date etc but again no pattern.

I'm guessing I need to add a couple of extra removes ... eg...
... $removeArray[] = "global_form_field_names";

It's only a basic form.
this is a typical full db entry (I've replace the form content inputs with the db field names)

contact name field<br />
email field<br />
phone number field<br />
company name field<br />
enquiry details field (followed by extra numbers)<br /><br />33<br />12<br />

It's not the most crucial of tidying ups but it would be nice to get id of the extra numbers.

Thanks
nathan

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...