close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Do i need to rset the recordset when sending multiple emails?

Thread began 11/28/2011 1:44 pm by Base5 Designs | Last modified 11/29/2011 12:25 pm by Jason Byrnes | 1014 views | 3 replies |

Base5 Designs

Do i need to rset the recordset when sending multiple emails?

Hi There just a quicky this time

am sending response emails using multiple send email behaviours that use diffirent templates, for order confirmations, one of the admin and one for the user.

when i first tried it the first email to the user sent with all the correct data from the cart stored in the database but the second one to the admin did not have the data in it.

i added mysql_data_seek($recordset, 0);
beween the email behaviours
now i am getting, a blank line at the top of the email.

product | Quantity | Price | Total

£ £
product1 2 £5 £10
product2 2 £10 £20
shiping £10
Total £40



any ideas as the correct procedure for working with multiple email behaviors where the content loops through the same recordset?

do i even need the mysql_data_seek?

Sign in to reply to this post

Jason ByrnesWebAssist

when using mysql_data_seek, you also need to reset the recordset array:

mysql_data_seek($rsRecordset, 0);
$row_rsRecordset = mysql_fetch_assoc($rsRecordset);

Sign in to reply to this post

Base5 Designs

Thanks jason,

i actually did a work around with an if statement on the row which checks to see if the fields in the row contains any values, which seems to work.

but reseting the $row_recordset is a much better method, which i will remember for next time.

sorry to take this thread a little of topic:
i am still having problems clearing the session id on the response page.

i am using worldpay which pulls in the page from the server, then displays it through the confirmation page on their site, so i dont know if this would actually clear the session for my site.

any ideas? i guess a workaround would be to have a button on the response page hat links back to mysite, and rather than going to my index page it would go to a clear session page then redirect to the index page.


this is he code i have at the end of the response page:

<?php
// WA eCart Trigger Clear Cart
$eCart1->ClearCart();
?><?php
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
@session_start();

//store the UserID Session Variable
if(isset($_SESSION['UserID']) && $_SESSION['UserID'] != "") {
$UserID = $_SESSION['UserID'];
}
if(isset($_SESSION['UserGroupID']) && $_SESSION['UserGroupID'] != "") {
$UserID = $_SESSION['UserGroupID'];
}
// Unset all of the session variables.
$_SESSION = array();

// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (isset($_COOKIE[session_name()])) {
@setcookie(session_name(), '', time()-42000, '/');
}

// Finally, destroy the session.
session_destroy();
@session_start();
//Reset the UserID Session Variable
if(isset($UserID) && $UserID != "") {
$_SESSION['UserID'] = $UserID;
}
if(isset($UserGroupID) && $UserGroupID != "") {
$_SESSION['UserGroupID'] = $UserGroupID;
}
?>
what would you reccomend?

Sign in to reply to this post

Jason ByrnesWebAssist

you started a new thread for this issue:
showthread.php?p=114763&posted=1#post114763


see my reply there.

Sign in to reply to this post

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