Log in

View Full Version : Contact forms



Helpie
15-02-2007, 05:47 PM
Need help creating contact / Application froms. I have macromedia dreamweaver. Any help ( + REP ) :)

Edited by Lµke (Forum Moderator): Thread Moved From Website Designing. Please post in the correct section next time, Thanks :).

ZAG
15-02-2007, 05:58 PM
Create the form in HTML
Send the mail in PHP using the mail() function.



<?php
if(!$_POST['sendmail']){
?>
<form name="contact" action="<?PHP $_SERVER['SELF']; ?>" method="POST">
Name: <input type="text" name="name"><br>
Email: <input type="text" name="email"><br>
<input type="submit" name="sendmail" value="Send!">
</form>
<?php
}else{
mail("[email protected]","subject",$_POST['name']." ".$_POST['email']);
?>
Mail Sent!
<?php
}
?>


Thats just showing some codes.

Helpie
15-02-2007, 05:59 PM
So if i created form in macroemida and inserted thatcode in. It wil lsend to the adress i want?

ZAG
15-02-2007, 06:04 PM
Well that was just an example, it sends the Name and Email the person has entered to [email protected]

Helpie
15-02-2007, 06:14 PM
Righty ty

Want to hide these adverts? Register an account for free!