CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Email query string

Print topic Send  topic

Author Message
Karen
Posted: 02/24/2003, 1:12 AM

I need to add a list of products selected by the user into the query string and then dissect the query string into a list to be emailed. Can anyone offer some clues how to start? Thanx in advance.
EMG
Posted: 02/24/2003, 6:19 PM

what scripting language?
Karen
Posted: 02/24/2003, 10:15 PM

I'm using PHP/MySQL. Thanx.
EMG
Posted: 02/25/2003, 7:37 AM

Try this Karen:

while(list($key, $value) = each($HTTP_GET_VARS))
{
$body .= $key . ": " . value;
}

$to = "";
$subject = "";
$from = "";

mail($to, $subject,$body,$from);

-ERIC
EMG
Posted: 02/25/2003, 7:47 AM

oops,

replace the $body string in the loop with:

$body .= $key . ": " . $value . "\n";
Karen
Posted: 02/26/2003, 12:57 AM

Sorry, Eric. I think I will need a little more help. First of all, how do I collect all the info into the query string as the user browses on different pages? How to preserve the string as the url changes? I'm a beginner in this so pls be patient. Thanx.
Karen
Posted: 02/26/2003, 2:05 AM

I think I'll add the selections to a hidden field, in case the limit of the url is exceeded. So another question is how do I add a button onto a record form which only displays the product record, which will result in appending the product to the hidden field when clicked? Sorry, I'm not sure how this is usually done but I'm trying to collect the user's selection without requiring login so it doesn't write to the database. Anymore advice there? Thanx very much.
EMG
Posted: 02/26/2003, 9:23 AM

Sounds like you are better off puting the info into session variables since the values span multiple pages. Look at the CCS/PHP documentation for session.
Karen
Posted: 02/26/2003, 4:14 PM

Yes, thanx Eric. I was just thinking abt that. Can sessions be used without logging in? I was just referring to me book and it seems possible but I'm not sure how to do it with CC. I'll check the CC documentation as you suggested. Hopefully, it will be detail enough. Thanx for your advice.
EMG
Posted: 02/27/2003, 6:35 AM

Session variables can be created at any time without a login. A new session id is created and given to every client that loads a page at your site (unless session is turned off). Use the page after initialize event to grab the qstring variables and put them into session variables (using CCSetSession function).
Karen
Posted: 02/27/2003, 5:05 PM

Thanx, Eric. Now I'll dive into sessions.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.