Help with GODADDY

the mail() function

Moderators: macek, egami, gesf

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Wed Aug 25, 2004 9:08 pm

why do you need some gdform.. ?

make your own form.. and send the mail to you
using the mail
[/url]

bug
New php-forum User
New php-forum User
Posts: 2
Joined: Fri Apr 08, 2005 1:00 pm

Postby bug » Fri Apr 08, 2005 1:05 pm

^ some of us are not as inclined to write our own code or require assistance. That is why we ask for help...

I too am using godaddy's gdform.php. So far this is the code I am using on my webpage, but I do not receive any Email in my inbox. I receive no errors either. I have not modified the gdform.php file.

You can view it at: http://www.beyondheadaches.com/ContactUs.htm

Code: Select all

<body>

<div align="center">
<form action="../gdform.php" method="post">
 
  <input type="hidden" name="subject" value="Form Results">
  <input type="hidden" name="redirect" value="index.html">
  <input type="hidden" name="Print_Config" value="FromName">
  <input type="hidden" name="required" value="FromName,FromEmail">
  <input type="hidden" name="Print_Blank" value="yes">
  <strong>
  Select a recipient:</strong><br>
  <input type="radio" name="recipient" value="email address one" checked> Webmaster<br>
  <input type="radio" name="recipient" value="email address two"> Dr. Jeffry Finnigan<br><br>
 
  Name:
  <input type="text" name="FromName" size="30"><br>

  Email:
  <input type="text" name="FromEmail" size="30">
  <br>
  <br>

  How did you hear about our site? <br>
  <input type="text" name="HeardFrom" size="55">
  <br>
  <br>

  Comments or Questions? <br>
  <textarea rows="10" name="comments" cols="50"></textarea>
  <br>

  <input name="submit" type="submit" class="button" value="Submit" >


</form>
</div>
</body>

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Sat Apr 09, 2005 3:43 am

Guys.. its actually one step harder to write a contact form script then writing a phpinfo() in your file...

simply check the mail() function reference and comments on the same page: they have tons of good suggestions there... it will not be so hard... in case you are stuck: ask here.. or if you are lazy -- go to http://www.hotscripts.com and fins a contact form you like...

bug
New php-forum User
New php-forum User
Posts: 2
Joined: Fri Apr 08, 2005 1:00 pm

Postby bug » Tue Apr 19, 2005 5:36 pm

Thanks for everyones help. After reading many different posts and manuals, I finally got one that works with GoDaddy.com's gdform.php
By not using it. It appears that to use their form script, you must go to their setup site at godaddy.com and enter the address to send all form information submitted. Once that is set up it should work fine with any form that uses <form action="gdform.php" method="post"> (assuming the form and gdform.php is located in the root directory)

I would like to send to a couple of different addresses depending on the users selection so I used the basic php mail() commands that are supported by godaddy's basic hosting ($3.95/mo). You need two files, the form file and the php mail script. They are listed below and work for my site. Hope they work for you too.

First file is the mail form
This can be viewed at (BeyondHeadaches.com)

(mail.html)

Code: Select all

<html>
<head>
<title>PHP qdform Mail</title>
</head>

<body>

<form action="mailer.php" method="POST">

<strong>Select a recipient:</strong><br>
<input type="radio" name="recipient" value="email@emailaddress.com" checked> Webmaster<br>
<input type="radio" name="recipient" value="email2@emailaddress.com"> Dr. xxx xxxx<br><br>

Name: <input type="text" name="From_Name"><br>
Email: <input type="text" name="From_Email" size="24"><br><br>

How did you hear about our website?<br>
<input type="text" name="Heard_From" size="50"><br><br>

Comments or questions:<br>
<textarea rows="10" name="Comments" cols="50"></textarea><br><br>

<input type="submit" value="Submit">
</form>
</div>
</body>
</html>



The second files is the php mail script that will reload a thank you page after sending the mail.

(mailer.php)

Code: Select all

<?
// Your thank you site.
$thankyou="http://www.beyondheadaches.com/mail/index.html";
// Your Email addy
$email=$recipient;
mail($email, 'Question or comment from Beyond Headaches.com', print_r($_POST,true).'\n END');
echo "<script>location.replace('index.html');</script>";
?>


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 3 guests

cron