Solved

e-mail submission form issue

Posted on 2007-03-24
5
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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 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 …

737 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