Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP Contact Form not sending from server
Old 04-03-2008, 01:18 AM PHP Contact Form not sending from server
Novice Talker

Posts: 7
Trades: 0
On my hostgator account (site a), my form works fine so I know its not the coding. On our own server (site b), The form never sends from the php file on the server. If I put the full address to the php file on Site A onto the form on Site B, the contact form works..everything is sent out fine and it works but the only problem is when its sent it has my hostgator login@gator37.hostgator.com. What is it that our server doesn't have that the hostgator account does? It has to be some kinda server installation or somethin like that
JaymeNYC is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-03-2008, 04:29 AM Re: PHP Contact Form not sending from server
Super Spam Talker

Latest Blog Post:
PSD Squirrel Launched
Posts: 932
Trades: 7
I'm going to assume that your PHP script uses SMTP and not php's mail() function, and that login@gator... is your username for the SMTP server that you are still using...

Chuck us the code and we could probably help further.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Sir P is offline
Reply With Quote
View Public Profile Visit Sir P's homepage!
 
Old 04-03-2008, 08:37 AM Re: PHP Contact Form not sending from server
Novice Talker

Posts: 7
Trades: 0
Code:
<?php
if(isset($_POST['submit'])) {

	$to = "us@ssss.net"; 
	$subject = "New Sign Up!";
	$title = $_POST['title'];
	$first_name = $_POST['firstname'];
	$last_name = $_POST['lastname'];
	$address = $_POST['address'];
	$address2 = $_POST['address2'];
	$city = $_POST['city'];
	$state = $_POST['state'];
	$zip = $_POST['zip'];
	$country = $_POST['country'];
	$phone = $_POST['phone'];
	$email_field = $_POST['email'];

	foreach($_POST['check'] as $value) {
		$check_msg .= "$value was checked\n";
	}
	
	$body = "From: $title $first_name $last_name\n Address: $address\n Address 2: $address2\n City: $city\n State: $state\n Zip: $zip\n Country: $country\n Phone: $phone\n E-Mail: $email_field\n $check_msg";

	echo "Data has been sent!";
	mail($to, $subject, $body);
	
} else {
	echo "blarg!";
}
?>
thanks for all the help!
JaymeNYC is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 08:42 AM Re: PHP Contact Form not sending from server
Super Spam Talker

Latest Blog Post:
PSD Squirrel Launched
Posts: 932
Trades: 7
ok well that does use mail() and that blows the SMTP theory out the water.. can you show me the address of the live form?

cheers
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Sir P is offline
Reply With Quote
View Public Profile Visit Sir P's homepage!
 
Old 04-03-2008, 10:10 AM Re: PHP Contact Form not sending from server
Novice Talker

Posts: 7
Trades: 0
http://www.ternionform.com/tempsite/
JaymeNYC is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 11:20 AM Re: PHP Contact Form not sending from server
Super Spam Talker

Latest Blog Post:
PSD Squirrel Launched
Posts: 932
Trades: 7
O.K... the reason your seeing "login@gator37.hostgator.com" is because terninform.com is hosted on hostgator aswell ...

Quote:
ternionform.com 1 NS ns73.hostgator.com 86400s
ternionform.com 1 NS ns74.hostgator.com
ternionform.com 1 SOA server: ns73.hostgator.com
email: root@gator37.hostgator.com
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Sir P is offline
Reply With Quote
View Public Profile Visit Sir P's homepage!
 
Old 04-03-2008, 11:25 AM Re: PHP Contact Form not sending from server
Novice Talker

Posts: 7
Trades: 0
From what I understand the server that this form is on doesnt have an SMTP server.. so that is probably why the mail isnt being sent. is there a way around this?
JaymeNYC is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 11:44 AM Re: PHP Contact Form not sending from server
Super Spam Talker

Latest Blog Post:
PSD Squirrel Launched
Posts: 932
Trades: 7
Im a bit confused.... the above script doesnt work? I thought you said it worked but had that host gator addy in?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Sir P is offline
Reply With Quote
View Public Profile Visit Sir P's homepage!
 
Old 04-03-2008, 12:05 PM Re: PHP Contact Form not sending from server
Novice Talker

Posts: 7
Trades: 0
on the live website, the form does not work when the php script is on the live websites server. If I put the php file on my hostgator server and put the form on the live website it works fine, but this is more of a temporary fix for now. I'm trying to get it to work from the Live websites server which I dont think has SMTP..is this more hardware that has to be bought? I know nothing about the server side of things so this is all new and confusin to me. But I was told that the emails werent being sent because the Live Server doesnt have SMTP
JaymeNYC is offline
Reply With Quote
View Public Profile
 
Old 04-08-2008, 06:15 AM Re: PHP Contact Form not sending from server
Super Spam Talker

Latest Blog Post:
PSD Squirrel Launched
Posts: 932
Trades: 7
Dont need SMTP.. just make sure the live server has mail() enabled in its php.ini...

Additionally run it on the live server and review the access/error logs to see whats going on
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Sir P is offline
Reply With Quote
View Public Profile Visit Sir P's homepage!
 
Reply     « Reply to PHP Contact Form not sending from server
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30588 seconds with 12 queries