Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Can someone help me out!!!!!

Can someone help me out!!!!!
Thread Tools
G4Man
Junior Member
Join Date: Dec 1999
Location: Long Beach, CA, USA
Status: Offline
Reply With Quote
Feb 3, 2006, 07:01 PM
 
Can anyone help me make this contest link form into a database or so that when someone submits the info, it goes to an email address?

I have this page all layed out, just need to figure out how to get the info submited back.

http://199.231.133.119/contests/drav...test_mock.html
     
Love Calm Quiet
Mac Elite
Join Date: Mar 2001
Location: CO
Status: Offline
Reply With Quote
Feb 4, 2006, 12:40 AM
 
Kinda of depends on what language you are up for using to program in.
I use PHP and use the $_GET['fieldname'] or $POST['fieldname'] functions in the page which receives the submitted values.
Then it's easy to use the PHP email function to send the variables in an email to whomever (and/or to put the data into an MySQL database.

I got enough (in my first PHP years) to do that easily from Ullman's Visual QuickPro Guide to PHP and MySQL.
TOMBSTONE: "He's trashed his last preferences"
     
G4Man  (op)
Junior Member
Join Date: Dec 1999
Location: Long Beach, CA, USA
Status: Offline
Reply With Quote
Feb 4, 2006, 03:39 PM
 
I need to see an example to guide me through? any thoughts or links.
     
jay3ld
Senior User
Join Date: Jul 2004
Status: Offline
Reply With Quote
Feb 4, 2006, 05:03 PM
 
heres the way i use to get feedback from our site.

[php]
<?
/*Senders Address */
$sendto="[email protected]";
/*Your Name or "The Web Admin" */
$sendtoname = "The Web Admin";

/*E-Mail Subject When the Mail is received */
$emailsubject="$serveraddress! - $visitorName Would Like to Speak to you!";

/* How do We want to thank them for the message they sent? */
$thankyou="Your message been sent To $sendtoname, thank you!";

/*Visitor Forgot his name. What do we say to them? */
$ErrorName = "Please enter your name. I would like to be able to call you Something other than Newb.";

/*Visitor Forgot his E-Mail. How do they execpt us to e-mail him back */
$ErrorEMail = "Please enter your email address! I need a valid E-Mail address so i can reply.";

/*Visitor Forgot what they wanted to say to us. How do we respond? */
$ErrorMessage = "Please enter your comments! I need to know what you want. To stop spamming i have logged your ip address be smart.";

/*Return Page? Were do we want them to go after it is sent? no http://yoursite.com/ that is done for you.*/
$ReturnPage = "home.htm";

/* Dont Change Anything Below */
$serveraddress = $_SERVER['SERVER_NAME'];
$client = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$UserAgent = $_SERVER["HTTP_USER_AGENT"];
$UserIPPort = $_SERVER["REMOTE_ADDR"] . ":" . $_SERVER["REMOTE_PORT"];

$redirect = "<meta http-equiv=\"refresh\" content=\"2;url=http://".$serveraddress."/".$ReturnPage."\">";
if ($submit) {

if ($visitorName <= "")
$message="$ErrorName";
else if ($visitorEmail <= "")
$message="$ErrorEMail";
else if ($comments <= "")
$message="$ErrorMessage";
if ($message)
echo ($message);
else {
$FullMessage = "\r\nName: $visitorName\r\nEmail: $visitorEmail\r\nCommentsr\n$comments\n\nSenders Informationn Address: $client\nUser Agent: $UserAgent\n IPort : $UserIPPort\n";
mail("$sendto", "$emailsubject", "$FullMessage", "From: $visitorName <$visitorEmail>");
echo "$redirect";
echo ("<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thankyou" );
die();
}
}
?>
Contact The WebAdmins.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Addres Information is sent with E-mail*<br />
<form method="post">
<p>
<font face="Verdana,sans serif" size="2">
Your Name:</font>
<br>
<input type="text" size="40" name="visitorName">
<br>
<font face="Verdana,sans serif" size="2">
Your email address - valid please or i cant reply to you:</font>
<br>
<input type="text" size="40" name="visitorEmail">
<br>
<font face="Verdana,sans serif" size="2">
Errors and comments here please:</font>
<br>
<textarea name="comments" cols=30 rows=10></textarea>
<p>
<font size="1">
<input type="submit" name="submit" value="submit E-Mail">
<br />
<br />
* Your IP is sent with The e-mail to prevent people from abusing the mailing system. Please have no worries about your Information.<br/> Your Information: <?php echo "Information:<br/> Address: $client <br/>User Agent: $UserAgent<br/> IPort : $UserIPPort"; ?></font>
</form>[/php]
You shouldn't make fun of nerds... you'll be working for one some day.
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 12:00 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,