submit page in php

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
harl
-


Joined: 23 Jan 2006
Posts: 62

PostPosted: Sun Mar 26, 2006 7:42 pm    Post subject: submit page in php Reply with quote

ok, what i need to do is somehow in php gather the fields in the form on my website, and email it to my email address. I cant find any programs or any scripts so maybe you guys can help

www.officialbass.com/submit.php

thats the page where people would submit stuff, maybe that would help you anwser me



thanks for any help
_________________
www.Officialbass.com
A subdivision of Official Instrument

Selling products for bassist, by bassists

Chord Finders
Scale Finders
Basics
and more to come
www.officialbass.com
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Mar 27, 2006 11:07 am    Post subject: Re: submit page in php Reply with quote

harl,

There is a sample script in http://www.aprelium.com/forum/viewtopic.php?t=656 .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
harl
-


Joined: 23 Jan 2006
Posts: 62

PostPosted: Tue Mar 28, 2006 12:55 am    Post subject: Reply with quote

ok, so tell me what im doing wrong


on my submit page (www.officialbass.com/submit.php) i have the form as this

Code:

<FORM ACTION="sendmail.php" METHOD=POST>
<p>Your name:
<br>
      <INPUT TYPE=TEXT NAME="name" size="47">
    <p>Forum Username or Email: <br>
      <INPUT TYPE=TEXT NAME="email" size="47">
    <p>Url for video or Article: <br>
      <textarea rows="15" name="question" cols="35"></textarea>
<p><INPUT TYPE=SUBMIT VALUE="Send">
</FORM>


and then in sendmail.php, the code is

Code:

<?php
$msg = "Sender Name:\t$name\n";
$msg .= "Sender E-Mail or Username:\t$email\n";
$msg .= "Url for video or Article:\t$question\n\n";
$recipient = "harleylang@gmail.com";
$subject = "Video or Article";
$mailheaders = "From: Officialbass.com <> \n";
$mailheaders .= "Reply-To: $email\n\n";
mail($recipient, $subject, $msg, $mailheaders);
?>


and then in the php.ini, i edited these lines

Code:

SMTP =smtp.gmail.com
smtp_port = 25

; For Win32 only.
;sendmail_from = harleylang@gmail.com


so what am i missing, because that is all that i have done... help please!!
_________________
www.Officialbass.com
A subdivision of Official Instrument

Selling products for bassist, by bassists

Chord Finders
Scale Finders
Basics
and more to come
www.officialbass.com
Back to top View user's profile Send private message Visit poster's website
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Tue Mar 28, 2006 7:44 am    Post subject: Reply with quote

Thats it. It should now work when you submit the form.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Mar 28, 2006 3:49 pm    Post subject: Reply with quote

harl,

smtp.gmail.com needs authentication which is not supported by PHP mail() function. You'll have to use your ISP SMTP server (if it does not require authentication) or install your own SMTP server.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
harl
-


Joined: 23 Jan 2006
Posts: 62

PostPosted: Tue Mar 28, 2006 3:59 pm    Post subject: Reply with quote

ok, do you know of any smtp servers that are good? and how with the one you suggest am i to set it up?
_________________
www.Officialbass.com
A subdivision of Official Instrument

Selling products for bassist, by bassists

Chord Finders
Scale Finders
Basics
and more to come
www.officialbass.com
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Mar 29, 2006 2:14 pm    Post subject: Reply with quote

harl wrote:
ok, do you know of any smtp servers that are good? and how with the one you suggest am i to set it up?


There is a list of suggested mails servers in http://www.aprelium.com/forum/viewtopic.php?t=7353 .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group