What a sweet way to greet someone on their first post! Nice to meet you too!
Some lists want code off the bat and some do not! Now I know it's ok to post it without it being requested.

<?php require_once('Connections/connGlobal.php'); ?>
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
return $theValue;

$editFormAction = $HTTP_SERVER_VARS['PHP_SELF'];
 $editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING'];

if ((isset($HTTP_POST_VARS["MM_insert"])) && ($HTTP_POST_VARS["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO comments (FIRST_NAME, LAST_NAME, EMAIL, COMMENTS) VALUES (%s, %s, %s, %s)",
GetSQLValueString($HTTP_POST_VARS['FIRST_NAME'], "text"),
GetSQLValueString($HTTP_POST_VARS['LAST_NAME'], "text"),
GetSQLValueString($HTTP_POST_VARS['EMAIL'], "text"),
GetSQLValueString($HTTP_POST_VARS['COMMENTS'], "text"));

 mysql_select_db($database_connGlobal, $connGlobal);
 $Result1 = mysql_query($insertSQL, $connGlobal) or die(mysql_error());

 $insertGoTo = "insertOK.php";
   $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
 header(sprintf("Location: %s", $insertGoTo));

<title>Customer Service</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
<link href="Assets/master.css" rel="stylesheet" type="text/css">

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('Assets/images/btnCustomerService_on.jpg','Assets/images/btnLocations_on.jpg','Assets/images/btnHome_on.jpg')">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<td rowspan="2" bgcolor="#424973"><img src="Assets/images/logo.jpg" alt="Logo" width="235" height="48"></td>
<td width="100%" bgcolor="#424973"><div align="right"><font color="#FFFFFF"><b>The
International Car Rental Specialists</b></font></div></td>
<td> <table width="100%" border="0" cellspacing="1" cellpadding="2">
<td align="center" width="20%" bgcolor="#424973"><a href="index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu1','','Assets/images/btnHome_on.jpg',1)"><img src="Assets/images/btnHome.jpg" alt="Home Button" name="menu1" width="90" height="25" border="0"></a></td>
<td align="center" width="20%" bgcolor="#424973"><a href="customerService.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu2','','Assets/images/btnCustomerService_on.jpg',1)"><img src="Assets/images/btnCustomerService.jpg" alt="Customer Service Button" name="menu2" width="110" height="25" border="0"></a></td>
<td align="center" width="20%" bgcolor="#424973"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu3','','Assets/images/btnLocations_on.jpg',1)"><img src="Assets/images/btnLocations.jpg" alt="Locations Button" name="menu3" width="90" height="25" border="0"></a></td>

<table width="841" border="0" cellpadding="0" cellspacing="0">
<td width="618" height="35" valign="top"> <FONT SIZE="+2" COLOR="#FF6600">Customer
<td rowspan="3" width="223" align="right" valign="top">&nbsp; </td>
<td height="405" valign="top"><p>We value your comments and questions. Please
fill out the form below and we'll be sure to answer as quick as possible.</p>

<form action="http://www.friendlyhousebuyers.com/cgi-sys/formmail.pl"; method="POST">
<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">First Name</td>
<td><input type="text" name="FIRST_NAME" value="Enter your first name" size="32">
<tr valign="baseline">
<td nowrap align="right">Last Name</td>
<td><input type="text" name="LAST_NAME" value="Enter your last name" size="32">
<tr valign="baseline">
<td nowrap align="right">Email Address</td>
<td><input type="text" name="EMAIL" value="Enter your email address" size="32">
<tr valign="baseline">
<td height="81" align="right" nowrap>Comments</td>
<td><textarea name="COMMENTS" cols="32">Enter your comments</textarea>
<tr valign="baseline">
<td nowrap align="right">&nbsp;</td>
<td><input type="submit" value="Insert Record">
<input type="hidden" name="MM_insert" value="form1" />
<input type="hidden" name="recipient" value="animals" />

<p>&nbsp;</p> </td> </table> </body> </html>


howard grämer New York City [EMAIL PROTECTED]

From: Neil Smth <[EMAIL PROTECTED]>
Subject: [PHP-DB] Re: Send formmail data to Email and Database
Date: Mon, 24 Nov 2003 08:28:25 +0000

Since you didn't feel it necessary to include your form processing code, and as we're not mind readers, we are unable to help you. Sorry, better luck next time.

Cheers - Neil.

At 07:57 24/11/2003 +0000, you wrote:
  PHP List stats since 1997:
From: "howard gramer" <[EMAIL PROTECTED]>
Date: Sun, 23 Nov 2003 18:49:23 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Subject: Send formmail data to Email and Database

(newbie alert!)
DWMX, Host: PHP, MySQL, Sendmail, and my own Cgi-Bin

I had the database action working well. But then trying to get the email to work I had to switch their positions in the code. Email now on top and database on bottom. So now the database action is not activated.

How can I get the form data to post to the email and the database?

Is there a gadget-lover on your gift list? MSN Shopping has lined up some good bets! http://shopping.msn.com

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to