I have this form setup to allow customers to fill in a little info and send an email to particular departments that they have their questions in. For some reason I cannot get it to work and in further playing around with it I get an HTTP 500 IS Error and it won't even load the page. Please help! Oh and I took the @ addres off the emails for this post. I know they're not there. - $Dept = $_REQUEST['Department'];
-
$First = $_REQUEST['firstname'];
-
$Last = $_REQUEST['lastname'];
-
$Com = $_REQUEST['company'];
-
$Acc = $_REQUEST['account'];
-
$Add = $_REQUEST['adderss'];
-
$City = $_REQUEST['city'];
-
$State = $_REQUEST['state'];
-
$Zip = $_REQUEST['zip'];
-
$Phone = $_REQUEST['phone'];
-
$Email = $_REQUEST['email'];
-
$Help = $_REQUEST['help'];
-
$Sub = $_REQUEST['subject'];
-
$Mess = $_REQUEST['message'];
-
-
$message = $First." ".$Last."\n";
-
$message .= $Com."\n";
-
$message .= $Acc."\n\n";
-
$message .= $Add."\n";
-
$message .= $City." ".",".$State." ".",".$Zip."\n";
-
$message .= $Phone."\n";
-
$message .= $Email."\n";
-
$message .= $Help."\n\n";
-
$message .= $Mess;
-
-
switch ($Dept)
-
{
-
case "Repair Parts":
-
$email_to = "rlacey", "hrichwine";
-
break;
-
case "Rebuilt Exchange Parts":
-
$email_to="rlacey", "hrichwine";
-
break;
-
case "Conversions & Conversion Kits":
-
$email_to="rlacey", "hrichwine";
-
break;
-
case "Test Equipment & Specialty Items":
-
$email_to="rlacey", "hrichwine";
-
break;
-
case "Test Equipment & Specialty Items":
-
$email_to="rlacey", "hrichwine";
-
break;
-
case "Customer Service":
-
$email_to="rlacey", "hrichwine";
-
break;
-
case "Account Receivable":
-
$email_to="kfatherree", "tfraker";
-
break;
-
case "Accounts Payable":
-
$email_to="jlehman", "tfraker";
-
break;
-
case "Service Schools":
-
$email_to="hrichwine";
-
break;
-
case "Rebuilt Exchange Parts":
-
$email_to="sfrank";
-
break;
-
case "Operations":
-
$email_to="ecowan", "eburkhart";
-
break;
-
case "President":
-
$email_to="bbowman", "hrichwine";
-
break;
-
case "Service Center":
-
$email_to="eburkhart", "ecowan";
-
break;
-
case "Sales / Marketing":
-
$email_to="pjones", "tgasull";
-
break;
-
case "Tech Support":
-
$email_to="dfreet", "ssteinour";
-
break;
-
default:
-
$email_to = "ijimenez"; // fail-safe value
-
}
-
mail( $email_to, "Feedback Form Results", $message, "From: $email" );
17 1945 Dormilich 8,658
Recognized Expert Moderator Expert
Hi Nyris,
$email_to = "name", "name2"; will probably throw an error. if you meant to concatenate the two strings, use the dot operator (see PHP: Strings - Manual)
and one more thing:
For the benefit of our experts and yourself, it is a posting guidelines that all users use [code] tags when posting code. This makes the code easier to read and, in turn, helps our experts answer your questions.
An easy way to do this is to highlight the code in the textarea and then hit the '#' button at the top of the textarea.
Please read the Posting Guidlines so you're more familiar with how things work.
regards
Markus 6,050
Recognized Expert Expert @Dormilich
That sounds familiar :P
Yes, Nyris, please do use [code] tags.
Moderator.
Sorry, I'll remember to do it next time. Thanks for the help on the dot operator. The page loads now and there isn't an error until the submit button is hit. Then it gives the 500 Error - IS Error.
Any ideas on why? Thanks in advice for the help!
Dormilich 8,658
Recognized Expert Moderator Expert
maybe we can spot an error if we can have a look at the html output file (maybe some form action error..)
@markus: I couldn't put it in better words, so - yes
Here's what I have for the actual form. Thanks again in advance! Dormilich 8,658
Recognized Expert Moderator Expert
you have not specified the file, that should process your form. - <form action="form_processing_file" method="post">
note: the action-attribute is mandatory, therefore the error.
regards
I'm sorry.. New to PHP.. This file is something that I created or just simply put what you have there?
Dormilich 8,658
Recognized Expert Moderator Expert @Nyris
......???
your HTTP 500 error is actually not a PHP error but a HTML error. see Forms in HTML documents. or in simple words: always define the action attribute of the form element (it has to point to a file).
regards
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Randell D. |
last post by:
HELP!
I am determined to stick with this... I'm getting there... for those who
haven't read my earlier posts, I'm createing what should be a simple
function that I can call to check that required fields in a form have
values. I'm writing the values to the client using document.write only so
that I can confirm that the values are there to be played with - this is not
the final result so please (unless it's leading to the script failure)...
|
by: Tonya |
last post by:
Hi,
Does anyone have any example of how i can manage forms in
my application??
I want to be able to reference my form instances that are
currently open from other forms.
why cant i open and close forms as easily as in VB6??
|
by: Gregory A Greenman |
last post by:
I'm trying to write a program in vb.net to automate filling out a
series of forms on a website. There are three forms I need to
fill out in sequence. The first one is urlencoded. My program is
able to fill that one out just fine.
The second form is multipart/form-data. Unfortunately, I haven't
been able to fill that out in a way that makes the server happy.
I set up a copy of this form at my web site so that I could see
exactly what a...
|
by: Pat Patterson |
last post by:
I'm having serious issues with a page I'm developing. I just need some
simple help, and was hoping someone might be able to help me out in
here.
I have a form, that consists of 3 pages of fields. I'd like to create
a page in which all of this is stored as you move along as hidden
variables, until the end, when the user submits. I can't figure out
one thing: I have dynamic form elements (dropdowns), that I'd like to
use instead of...
|
by: Lyn |
last post by:
Hi,
I am working on a genealogy form. The only table (so far) lists everybody
in the family, one record per person. Each record has an autonum ID.
The parent form (frmMainForm) displays the data in each record, which
includes the ID of the father and the mother (who also have records in the
table). One record per form.
I have a Tab Control in the form, and in one of the tabs I have a subform
(sfmSiblings) in which I wish to list...
| |
by: Dave Guenthner |
last post by:
I have a csharp form1.cs created with VS. I have added a menu bar
with one option called help. I then created another form in VS called
help.cs. How can I launch the help form from the main form called
form1.
Seems simple.
private void menuItem5_Click(object sender, System.EventArgs e)
{
// Menuitem5_Click is the help menu item user sees
|
by: Kathy Burke |
last post by:
HI. in asp.net app, I have an xmlDocument that I transform to the client
html. Using xsl I create a few textboxes to capture user input. Each of
these are related to <data> elements in the xmlDoc.
I want to use the Forms collection to post the html form back to an
asp.net page, and process each request.form object (textbox) via an xml
node.value update.
For any given xmlDocument there is an unknown number of items resulting
in...
|
by: Lee Newson |
last post by:
Hi,
I have just written my first application using VB.NET. The app works fine
when i am running it within .NET for debugging purposes, however when i try
to run the app from the .exe file that .NET creates i get the following
error message:
"An unhandled exception of type 'System.IO.FileNotFoundException' occurred
in VisioTimeline.exe
|
by: mohit.akl |
last post by:
Hey guys & gals
I am havng trouble modifying the control box. I want to make the
maximise button invisible and have minimisise button instead of it.
Like this _ X (not like _ o X )
How to do this... and eventually i want to modify the control box in
the form of ? _ X ... I.e. adding a new button to control box. I need
to detect the click events.
|
by: MikeB |
last post by:
Hi, I'd appreciate some help, please. I'm writing a VS2005 VB project
for school and one of the requirements is that every screen should have
a "Help" button.
I could do it by writing a clumsy case statement like this:
sub showHelp(byval frm as String)
Select Case (frm)
Case "Form1"
dim help as new Form1
|
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: 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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |