Solved

e-mail submission form issue

Posted on 2007-03-24
5
179 Views
Last Modified: 2007-06-11
I'm using the following script to get feedback from my users,

<?php
if($name) {
$name=$_GET['name'];
$email=$_GET['email'];
$subject1=$_GET['subject'];
$row=$_GET['row'];
$phone=$_GET['phone'];
$event=$_GET['event'];
$eventdate=$_GET['eventdate'];
$section=$_GET['section'];
$ask=$_GET['ask'];
$quantity=$_GET['quantity'];
$message=$_GET['message'];
$ip=$_SERVER["REMOTE_ADDR"];
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$host = $ip.".".$host;
$mon=date(m);
$day=date(j);
$year=date(y);
$hour=date(g);
$min=date(i);
$sec=date(s);
$hour=$hour-2;
if($hour<=0) { $hour+=12; }
$ts = "$hour:$min:$sec on $mon/$day/$year";
$to="******@hotmail.com";
$subject="Tickets For Sale: "." $event";
$body="
Offer From: $name
E-mail: $email
Phone: $phone
Event Name: $event
Event Date: $eventdate
Section: $section
Row: $row
Quantity: $quantity
Asking Price Per Ticket: $ask
Additional Comments: $message


Host: $host
Time: $ts";

mail($to, $subject, $body);
echo "<script>location.href=\"selltickets1.php\"</script>";
}
 ?>

It worked on my old server but now on my server it doesn't What do I need to enable in apache to get this working?
0
Comment
Question by:JPERKS1985
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:wildzero
ID: 18786355
if(isset$_GET['name']) {

because some servers used to have

$_GET['name'] was the same as $name
but that setting is probly turned off.
So just change that first bit and u should be sweet!
0
 
LVL 10

Expert Comment

by:wildzero
ID: 18786363
if (isset($_GET['name'])) {


I typod :P
0
 
LVL 5

Expert Comment

by:Trakos
ID: 18786375
What do you mean by "it doesn't work"? Are there any errors? Is your site being displayed?
You've asked what do you need to enable in apache. Is your code is just displayed with all <?php ?> stuff? Then you have to install php on your server (or if you have already installed - edit your httpd.conf according to php readme). Could you post more informations?
0
 
LVL 1

Author Comment

by:JPERKS1985
ID: 18786509
Wildzero, that didn't do the trick. Trakos I'm asking if I need to enable email on the server. PHP is installed. Site is working but email isn't sent.
0
 
LVL 5

Accepted Solution

by:
Trakos earned 500 total points
ID: 18786555
If you haven't already, you need to configure your php.ini. Check examples at http://www.sitepoint.com/article/advanced-email-php
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now