Hi
I am Adamnet Im looking for a support sender php that when ytou fill stuff out and you click send it sends to my email i had a thing like it before but it dident do like i wanted it to and you had to do more sutff
Hi
I am Adamnet Im looking for a support sender php that when ytou fill stuff out and you click send it sends to my email i had a thing like it before but it dident do like i wanted it to and you had to do more sutff
mm....you had to do more stuff...?
oh...like these has nothing to do with design and stuff...
but
maybe u wanted a different look of m...sender...whatever...
me myself i kno how to make those in dreamweaver..it depens what kind of web u are developing,..like html php....or maybe u are using joomla...etc
If using dreamweaver..two tuorials
http://dreamweaver-demos.12wonderweb...weaver-MX.html
http://www.precisionweb.net/tutorial..._dwmx_form.htm
ull have just to edit css
and maybe u will like also this
http://www.formlogix.com/
http://www.formsite.com/
Last edited by yokofigueroa; 03-19-2008 at 06:20 AM.
http://www.w3schools.com/php/php_mail.aspCode:<html> <body> <?php if (isset($_REQUEST['email'])) //if "email" is filled out, send email { //send email $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['message'] ; mail( "someone@example.com", "Subject: $subject", $message, "From: $email" ); echo "Thank you for using our mail form"; } else //if "email" is not filled out, display the form { echo "<form method='post' action='mailform.php'> Email: <input name='email' type='text' /><br /> Subject: <input name='subject' type='text' /><br /> Message:<br /> <textarea name='message' rows='15' cols='40'> </textarea><br /> <input type='submit' /> </form>"; } ?> </body> </html>
:happysad:;):cool::nuts::rant2::drool::eek4::dunno::thefinger
:laugh::hahano::lockd::naughty:
Here's the code for the system I use:
contact.php =
email-check.js =PHP Code:<?php
session_start();
$cansend=$HTTP_POST_VARS['cansend'];
if($cansend==1) {
$mailTo = "Your E-Mail Address"; # Put your E-mail Address here
$name=$HTTP_POST_VARS["name"];
$from=$HTTP_POST_VARS["email"];
$message=$HTTP_POST_VARS["message"];
$subject=$HTTP_POST_VARS["subject"];
$mailSubject="Website: $subject (From: $name)"; # Use this to customise the subject of the E-Mail.
$mailbody=$mailbody."\n".$message;
$headers = "From: $from";
if(mail($mailTo,$mailSubject,$mailbody,$headers))
{
$status="<div style='color:green;font-weight:bold;'>Your message has been sent successfully!<BR>I will get back to you as soon as possible.</div><BR><A href=index.php>Back to the homepage</A></center>";
}
else
{
$status="<center><div style='color:red;font-weight:bold;'>There was an error in sending your message!</div><BR><A href=index.php>Back to the homepage</A></center>";
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>Contact the Admin</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
</HEAD>
<BODY>
<SCRIPT type="text/javascript" language="javascript" src="email-check.js"></SCRIPT>
<TABLE cellpadding=5 cellspacing=2>
<?php
if($status) {
?>
<TR>
<TD colspan="2"><FONT size="+1"><B><?php echo $status;?></B></FONT></TD>
</TR>
<?php
}
else {
?>
<TR>
<TD colspan="2"><P style="color:#FF0000">* All fields are required. </TD>
</TR>
<FORM method="post" name="contact" action="contact.php" onSubmit="return validate();">
<TR>
<TD align="right"><STRONG>Your Name: </STRONG></TD>
<TD><INPUT name="name" type="text" maxlength="30"></TD>
</TR>
<TR>
<TD align="right"><STRONG>Your E-mail: </STRONG></TD>
<TD><INPUT name="email" type="text" maxlength="40"></TD>
</TR>
<TR>
<TD align="right"><STRONG>Subject: </STRONG></TD>
<TD><INPUT name="subject" type="text" maxlength="40"></TD>
</TR>
<TR>
<TD align="right" valign="top"><STRONG>Message: </STRONG></TD>
<TD><TEXTAREA name="message" cols=50 rows="10"></TEXTAREA></TD>
</TR>
<TR>
<INPUT type="hidden" name="cansend" value="0">
<TD> </TD>
<TD>
<INPUT type='submit'>Send</INPUT>
<INPUT type='button' onClick="redirect();">Cancel</A>
</TD>
</TR>
</FORM>
<?php
}
?>
</TABLE>
</BODY>
</HTML>
Copy and Paste the code to the file names specified, then edit it to change your email address URL to you homepage etc. Then upload to your server. To test it go to contact.php in your browser fill in the form and click 'send'.Code:function redirect() { window.location="URL to your homepage"; } function validate() { document.contact.cansend.value=1; return true; } function isEmail(emailstr) { dotchar = emailstr.indexOf("."); atchar = emailstr.indexOf("@"); dotlast = emailstr.lastIndexOf("."); spacechar = emailstr.indexOf(" "); len = emailstr.length; if( (dotchar == -1) || (atchar == -1) || (spacechar != -1) || (dotlast < atchar) || (dotlast == len - 1) ) { return false; } else { return true; } } function trim(str) { ch = ''; for(i=0;i<str.length;i++) { cha = str.charAt(i); if(cha != ' ') { ch = ch + cha; } } return ch; }
NOTE: If you haven't already you will need to upgrade to intermediate PHP for the mail() function to work.
Useful Links:My Websites:
Terms of Service | Server News | Buy a Domain
Free Domains: co.cc | Dot.tk -- Free File Storage: Dropbox -- Website Monitoring: Service Uptime
Earthtime Games & TechAsh's Blog
Thanks and i will upgrade!
This is a basic version of the system i use:
'form.php'
HTML Code:<html> <head> <style> textarea.message{ width: 300px; height: 200px; } </style> </head> <body> <form action="formpost.php" method="post" id="form"> <textarea id="message" value="" class="message"></textarea><br /> <input type="submit" value="Send Message" /> </form> </body> </html>
'formpost.php'
its short and it works.PHP Code:<?php
$message = $_REQUEST['message'] ;
?>
<html>
<body>
/*html code*/
<?php
if(mail(email@host.com,"subject",$message)
{
echo "/*html code for success*/";
}
else
{
echo "/*html code for failure*/";
}
?>
</body>
</html>
hope it helps!
Last edited by kbjradmin; 03-28-2008 at 02:25 PM.
but is mail() supported by x10hosting??????:dunno::lockd::happysad:
Yes.
If you read my previous post I have already mentioned this.
You must upgrade you PHP to Intermediate to be able to use mail(). You can request an upgrade from the account panel (http://www.x10hosting.com/login).Originally Posted by TechAsh
Useful Links:My Websites:
Terms of Service | Server News | Buy a Domain
Free Domains: co.cc | Dot.tk -- Free File Storage: Dropbox -- Website Monitoring: Service Uptime
Earthtime Games & TechAsh's Blog
You guys may want to be more secure with what you are being sent. If you don't want to be send images or links or HTML in general I'd use
PHP Code:strip_tag($message);