CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Can anyone see what might be wrong with this inser

Print topic Send  topic

Author Message
Frank S.
Posted: 03/15/2002, 2:43 PM

Hi all,
Trying to modify the "Tell A Friend". I have been successful in making it all work except for inserting the "from_email" field into the DB and having it show as the sender in the e-mail. In the DB the field "from_email" remains blank while the "from" area of the sent e-mail is sent from "httpd".
Here's the code:

$to_email = get_param("to_email") . "," ;
$to = "Mike and Charlene<michael09@xyz.net>";
$from_email = get_param("from_email");
$subject = "Vehicle Move Request from " . get_param("from_name");

$body = "Hello " . get_param("to_name") . "!" . chr(13) .
chr(13) . get_param("from_name") .
" sent you this page from the xyz Web Site." . chr(13) .
"http://www.xyz.com" . chr(13) . chr(13) . "Special Instructions from " .
get_param("from_name") . ":" . chr(13) . get_param("message_comments") . chr(13)
. chr(13) . "Pickup Date" . ": " . get_param("pickup_date")
. chr(13) . "Vehicle Year" . ": " . get_param("vehicle_year")
. chr(13) . "Vehicle Make" . ": " . get_param("vehicle_make")
. chr(13) . "Vehicle Model" . ": " . get_param("vehicle_model")
. chr(13) . "Pickup City" . ": " . get_param("pickup_city")
. chr(13) . "Pickup State" . ": " . get_param("pickup_state")
. chr(13) . "Deliver To City" . ": " . get_param("delivery_city")
. chr(13) . "Deliver To State" . ": " . get_param("delivery_state");



$db->query("insert into tellafriend_log (sending_date, from_email, from_name, to_email, to_name, pickup_date, vehicle_year, vehicle_make, vehicle_model, pickup_city, pickup_state, delivery_city, delivery_state, message_comments) values (" .
tosql(date("Y-m-d G:i:s"), "Text") . "," .
tosql(get_param("from_email"),"Text") . "," .
tosql(get_param("from_name"),"Text") . "," .
tosql(get_param("to_email"),"Text") . "," .
tosql(get_param("to_name"),"Text") . "," .
tosql(get_param("pickup_date"),"Text") . "," .
tosql(get_param("vehicle_year"),"Text") . "," .
tosql(get_param("vehicle_make"),"Text") . "," .
tosql(get_param("vehicle_model"),"Text") . "," .
tosql(get_param("pickup_city"),"Text") . "," .
tosql(get_param("pickup_state"),"Text") . "," .
tosql(get_param("delivery_city"),"Text") . "," .
tosql(get_param("delivery_state"),"Text") . "," .
tosql(get_param("message_comments"),"Text") . ")");

mail($to_email, $to, $subject, $body,"From: $from_email\nReply-To: $from_email\nX-Mailer: PHP/" . phpversion());

If anyone has any ideas, please feel free!
thanks in advance,
Frank

Copy this code and use it!
Nicole
Posted: 03/16/2002, 4:45 AM

Frank,
check the name of "from_email" field on the form (specified on field/properties/'Name' field) match the variable name used in event code.
Sam M
Posted: 03/19/2002, 8:59 AM

Your get_param("whatever") statement is wrong.
Try changing it to getparam("Field name")

   


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.