Jump to content

form, question


ylem

Recommended Posts

<HTML><HEAD><TITLE>title</TITLE><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251"><style type="text/css"><!--td {	text-align: left;	vertical-align: top;	font-family:Tahoma;	font-size:9px;	color:D7D8D8;}a {	text-decoration: none;}a.1 {	text-decoration: none;	color: 000000;}input {	background-color: #CCCCCC;	border-right-width: 1px;	border-bottom-width: 1px;	}textarea {	background-color: #CCCCCC;	border-right-width: 1px;	border-bottom-width: 1px;	}.t11 {	font-family: Tahoma;	font-size: 11px;	font-style: normal;}.t9 {	font-family: Tahoma;	font-size: 9px;	font-style: normal;}.style8 {color: #999999}.style9 {color: #d7d8d8}.style11 {color: #d7d8d8; font-weight: bold; }--></style><script language="javascript">function form_Validator(form){  if (comments.name.value == "")  {    alert("Please enter your Name.");    comments.name.focus();	return (false);     }  if (comments.email.value == "")  {    alert("Please enter your Email Address.");    comments.email.focus();    return (false);  }    if (comments.comment.value == "")  {    alert("Please enter your comments.");    comments.comment.focus();    return (false);  }    return (true);  }</script></HEAD><BODY bgcolor="191D1F"LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="comments.name.focus()"><center>  <TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 height="760">    <TR>      <td rowspan="4" background="images/left.jpg" width="50%"><img src="images/spacer.gif"></td>      <TD COLSPAN=5><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="770" height="408">          <param name="movie" value="flash/index.swf">          <param name="quality" value="high">          <embed src="flash/index.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="408"></embed>        </object></TD>      <td rowspan="4" background="images/right.jpg" width="50%"><img src="images/spacer.gif"></td>    </TR>    <TR>      <TD ROWSPAN=3><IMG SRC="images/14.jpg" WIDTH=64 HEIGHT=252 ALT=""></TD>      <TD COLSPAN=3><IMG SRC="images/15.jpg" WIDTH=638 HEIGHT=20 ALT=""></TD>      <TD ROWSPAN=3><IMG SRC="images/16_1.jpg" WIDTH=68 HEIGHT=252 ALT=""></TD>    </TR>    <TR>      <TD><!-- Left table starts here -->        <TABLE WIDTH=306 BORDER=0 CELLPADDING=0 CELLSPACING=0>          <TR>            <TD><IMG SRC="images/3t1.jpg" WIDTH=306 HEIGHT=21 ALT=""></TD>          </TR>          <TR>            <TD background="images/3t2.jpg" WIDTH=306 HEIGHT=193 ALT=""><div style="padding-top:10pt;padding-left:15pt;padding-right:15pt"><strong> <br>              TO be UPDATED BY either andrew or nick<br>                --------  n[K] ylem <br>              <br>            </strong> </TD>          </TR>        </TABLE><!-- Left table ends here -->      </TD>      <TD><IMG SRC="images/17.jpg" WIDTH=26 HEIGHT=214 ALT=""></TD>      <TD><!-- Right table starts here -->        <TABLE WIDTH=306 BORDER=0 CELLPADDING=0 CELLSPACING=0>          <TR>            <TD><IMG SRC="images/1t5.jpg" WIDTH=306 HEIGHT=21 ALT=""></TD>          </TR>          <TR>            <TD ALT="" width="306" height="193" background="/images/1t65.jpg" >     <div style="padding-top:5pt;padding-left:15pt">     <form name="comments" action="comments.php" method="post" onSubmit="return form_Validator(this);">     <table width="100%" border="0" cellspacing="0" cellpadding="0">       <tr>      <td>Name:</td>      <td><input type="text" name="name" size="26" height="12"></td>    </tr>    <tr>      <td>Email:</td>      <td><input type="text" name="email" size="26" height="12"></td>    </tr>    <tr>      <td>Comment:</td>      <td><textarea cols="21" rows="3" name="comment"></textarea></td>    </tr>    <tr>      <td colspan="2" align="center"><center><input type="submit" value="Send Comments" height="12"></center></td>    </tr>          </table>     </form>     </div>  	</TD>          </TR>            </TABLE><!-- Right table ends here -->      </TD>    </TR>    <TR>      <TD COLSPAN=3><IMG SRC="images/18.jpg" WIDTH=638 HEIGHT=18 ALT=""></TD>    </TR>    <tr>      <td ><img src="images/spacer.gif"></td>      <td colspan="5" height="150" background="images/bot.jpg"><img  src="images/spacer.gif"></td>      <td ><img src="images/spacer.gif"></td>    </tr>  </TABLE></center></BODY></HTML>

now heres my question, when someone completes a comment and click "submit", rather than sending the comment to URL, such as comment.php, i want the comment sending to an email of mine.. if thats possible.. Thanks

Edited by Skemcin
Link to comment
Share on other sites

nvm, i figured it out -- thanks to w3school!!!!its form action=MAILTO yourname@domain.com !!thanks

yeah, it works but it's not the best solution. using that opens the user's default e-mail application (e.g. microsoft outlook). it's better to use a script that mails the comment to your e-mail address. for instance, you can write code in comment.php to receive the comment and then e-mail it to you.
Link to comment
Share on other sites

yeah, it works but it's not the best solution.  using that opens the user's default e-mail application (e.g. microsoft outlook).  it's better to use a script that mails the comment to your e-mail address.  for instance, you can write code in comment.php to receive the comment and then e-mail it to you.

thanks alot .. but can u explain how the comment.php works?i dont understand php at all
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...