e-mail submission form issue

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

if($name) {
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$host = $ip.".".$host;
if($hour<=0) { $hour+=12; }
$ts = "$hour:$min:$sec on $mon/$day/$year";
$subject="Tickets For Sale: "." $event";
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?
Question by:JPERKS1985
  • 2
  • 2
LVL 10

Expert Comment

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!
LVL 10

Expert Comment

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

I typod :P

Expert Comment

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?

Author Comment

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.

Accepted Solution

Trakos earned 2000 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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

624 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