Hi guys!
I am coding my portfolio website, and I absolutely love the contact form used on this site (click on contact):
I attempted to customize a php contact form for my site, and it visually is working correctly, however when I click the submit button it goes to a blank white page and doesn’t send the email. I am only slightly experienced with php but I know html well. I am including my code below. Any help would be greatly appreciated!!
The HTML file code:
CSS//
form.cool textarea{
width:100%;
height:300px;
font-size:30px;
font-family:minion pro;
font-style:italic;
background:transparent;
border:none;
outline:none;
resize:none;
margin-top:10px;
}
form.cool input.submit{
text-transform:uppercase;
background-color:#000;
color:#fff;
border:none;
font-family:myriad pro;
font-weight:bold;
font-size:30px;
padding:10px;
width:200px;
border-radius:3px;
}
form.cool input.name{
text-transform:uppercase;
background-color:white;
border-style:double;
border-color:#FCEE21;
font-family:myriad pro;
font-weight:bold;
font-size:20px;
padding:10px;
width:200px;
border-radius:3px;
margin-bottom:15px;
}
SCRIPT//
<script type="text/javascript">
$(function(){
var string = "Dear Caitlin,".split(''); // split the string into an array
var i = 0; // used to track which character we are on
var timer = null; // used later to store a timer
var nextChar = function(){
if(i >= string.length)
{
// if i >= string.length then we are done
// so stop the timer
clearInterval(timer)
}else{
textarea = $('form.cool textarea');
// get the value of the textarea
value = textarea.val();
// set the value to the current value + the next character
textarea.val(value + string[i]);
// up the counter by one so that we use the next character next time
i = i+1;
}
}
timer = setInterval(nextChar,100);
});
</script>
HEAD//
<div id="body_wrapper">
<form class="cool" action="mail.php" method="POST">
<p>NAME</p> <input type="text" name="name" class="name">
<p>EMAIL</p> <input type="text" name="email" class="name">
<textarea name="message" class="cool"></textarea>
<input type="submit" value="send" class="submit" />
</form>
</div>
The PHP file code (named mail.php):
[php]
[/php]
Also I am using MAMP to test my site on my local computer first before I publish it.
Thanks!!