Feel like coding?

Status
Not open for further replies.

HotelCrazy

Member
Jan 14, 2011
86
6
Hey,

Anyone feel like coding a simple contact form?

Name + message + send button?

P.S.

Its for my radio station video page.


Thanks.
 

GarettM

Posting Freak
Aug 5, 2010
833
136
PHP:
<?php
################################################
# Radio Station From - Created By GarettMcCarty
################################################
 
function send()
{
    $realname = $_POST['realname'];
    $subject  = "Radio Station Change Me"; // Change Subject
    $to      = "[email protected]";
    $content  = $_POST['content'];
   
    if(isset($_POST['realname']) and isset($_POST['content']))
    {
        mail($to, $subject, "Message From ".$realname."<br />".$content);
    } else {
        print "<center>Name or Message is Blank</center>";
    }
}
?>
<form method="post">
<label>Your Name:</label><br />
<input type="text" name="realname" /><br />
<label>Your Message:</label><br />
<textarea cols="32" rows="12" name="content">Your Message Here</textarea><br />
<div align="right"><input type="submit" value="Mail" /></div>
</form>

Something like that? :confused:
 
Status
Not open for further replies.

Users who are viewing this thread

Top