Solved

e-mail submission form issue

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

808 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