Hello there,
I too am having a somewhat similar problem and would very much appreciate some assistance. Through PHP, I have already set up my Flash actionscript to pass info and variables onto a MySQL database that is functionable in retrieving user info (name, email, subject, and comments). My only problem is that I need to have the information that the user sends when the click submit to also send an email to the owner with the same info. He wants to get an individual email for each individual who inputs their info and hits submit.
I was trying to derive something from this code to get it to work, but nothing seemed to work: -
<?php
-
$my_result = $_POST['myData'];
-
-
$my_result = mail( "sales@longbeachclothing.com", "LBC Site Inquiry: $clientSubject",
-
"From: ".$clientName . "
-
Email: ".$clientEmail. "
-
Subject: ".$clientSubject. "
-
Message: ".$clientMessage, "From: $clientEmail" );
-
?>
-
-
Here is my current code. There are two files.
-
The first is called insert.php
-
<?php
-
ini_set('display_error',1);
-
?>
-
<?php
-
$connection = mysql_pconnect("localhost","longbeach562","40403141") or die('Could not connect: ' . mysql_error());
-
mysql_select_db("longbeach562", $connection) or die('Could not select database' . mysql_error());
-
?>
-
<?php
-
$_name = $_REQUEST['name'];
-
$_email = $_REQUEST['email'];
-
$_subject = $_REQUEST['subject'];
-
$_comments = $_REQUEST['comments'];
-
-
if ($_name != '' && $_subject != '') {
-
//if ($_name != '') {
-
$SQL = "INSERT INTO `userInfo` (`name`, `email`, `subject`, `comments`) VALUES ('$_name', '$_email', '$_subject','$_comments');";
-
mysql_query($SQL) or die('Query failed: ' . mysql_error());
-
echo("&success=Thank you, your info has been received.");
-
} else {
-
echo("&success=Some of your info is missing!");
-
}
-
?>
-
-
This second on is called select.php:
-
<?php
-
ini_set('display_error',1);
-
?>
-
<?php
-
$connection = mysql_pconnect("localhost","longbeach562","40403141") or die('Could not connect: ' . mysql_error());
-
mysql_select_db("longbeach562", $connection) or die('Could not select database' . mysql_error());
-
-
// no problems so query the db
-
$SQL = "SELECT * FROM userInfo;";
-
$result = mysql_query($SQL) or die('Query failed: ' . mysql_error());
-
?>
-
<?php
-
$output = "<table border=\"1\">\n" .
-
"<tr>\n" .
-
"<td>Id</td>\n" .
-
"<td>Name(s)</td>\n" .
-
"<td>Email(s)</td>\n" .
-
"<td>Subject?</td>\n" .
-
"<td>Comments</td>\n" .
-
"<td>Date & Time</td>\n" .
-
"</tr>\n";
-
-
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
-
$id = $row[0];
-
$name = $row[1];
-
$email = $row[2];
-
$subject = $row[3];
-
$comments = $row[4];
-
$date = $row[5];
-
$output .= "\t<tr>\n" .
-
"\t\t<td>$id</td>\n" .
-
"\t\t<td>$name</td>\n" .
-
"\t\t<td>$email</td>\n" .
-
"\t\t<td>$subject</td>\n" .
-
"\t\t<td>$comments</td>\n" .
-
"\t\t<td>$date</td>\n" .
-
"\t</tr>\n";
-
}
-
-
$output .= "</table>\n";
-
?>
-
<?php echo($output) ?>
-
<?php
-
mysql_free_result($result);
-
?>
-
</body>
-
</html>
0 2249 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: James Hong |
last post by:
Help please, I try to sending an email from my html page using the java
applet.
but it give error on most of the PC only very few work, what is the error i
make
the java applet show as below
**********************************
package Celcom.Client;
|
by: David Thompson |
last post by:
Looking for a book to help me develop a philosophy for building
databases (particularly on MySQL). And then taking them from concept to
construction.
Something like.... Start by asking which queries you will be performing,
then define all data needed for each of those queries, then progress to
normalize this data, etc.
Any Ideas....thanks...
|
by: jlibster |
last post by:
Hi, I wonder if someone can answer a quesiton for me: I'm modifying a
database with the purpose of adding the new feature of address change
history. My model would consist of a table for keeping client
name/logon (for a public site) info in one table, and address info in
another table because the login info would likely be more frequently
accessed/changed than address updates. Now a group that does data
entry internally through a web...
|
by: DigitalRick |
last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my
guestbook. It had been working fine untill I upgraded to Server 2003 (I am
also running Exchange 2003) all locally. I will include the code I
originally used. I understand I should switch from CDONTS to CDO mail but
after several sttempts I am finding a very hard time getting the new CDO mail
to work properly. Any assistance with this would be greatly...
|
by: A Palmblad |
last post by:
We're having a lot of trouble with one of our new servers. It's an AMD64
dual cpu system, running on Gentoo Linux, with kernel 2.6.7. Data is stored
on a JFS partition. Before we installed the server, memory was fully tested
and no problems were found. Postgres is version 7.4.3.
We've had a number of different errors. One of the most popular seems
to be a Cannot open segment. This usually occurs on an index, generally the
primary...
| |
by: sellcraig |
last post by:
Microsoft access
2 tables
table "data main" contains a field called "code"
table "ddw1" is created from a make table query of "data main"
Goal-
the data in "code" field in needs to be inserted into a standard web
address in the table (the filed name is link) in ddw1
Example address ---
|
by: southoz |
last post by:
Good ay all ,
I'm fairly new to access(a little over 5 weeks now). Since I'v started I have picked up a lot of useful information from forums such as this and in doing so will share that information with others. I have seen many request for information on mail merging an how to send data to word documents this is something I have put together with the answers given by others and I hope this will help a few newbies , I know there are easier ways...
|
by: rustyc |
last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-)
As I said over there:
... for a little side project at home, I'm writing a ham radio web site in uby/Rails. I started it in Perl and gave up on Perl as I went from the 'display the database information on the web page' to the 're-display the information from the database and allow the user to update the database using the web page' stage and realized...
|
by: adam87 |
last post by:
Below is my code, what I have done is create a form which sends via asp, it works fine within IE but when testing it in Firefox the entire form is outside the page. Hope you can help!
Adam Huxtable
HTML FILE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |