Solved

e-mail submission form issue

Posted on 2007-03-24
5
180 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

813 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

8 Experts available now in Live!

Get 1:1 Help Now