Log In · Register

 
 
Reply to this topicStart new topic
help with making a form
kristie7
post Jun 19 2008, 04:11 PM
Post #1


Senior Member
***

Group: Member
Posts: 67
Joined: May 2007
Member No: 525,594



website: Click Here

Problem: when I click on submit an error comes up

CODE:

CODE
v]<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="../../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../../SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
<link href="../../SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="35" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (yotmb.psd) -->
<table id="Table_01" width="1025" height="769" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td colspan="23">
<img src="http://youthonthemovebookclub.com/images/yotmb_01.jpg" width="1024" height="45" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="45" alt=""></td>
</tr>
<tr>
<td colspan="5">
<img src="http://youthonthemovebookclub.com/images/yotmb_02.jpg" width="133" height="3" alt=""></td>
<td width="153" height="38" colspan="3" rowspan="2" bgcolor="#D47727"><font face="arial"><center>Home</center></font></td>
<td colspan="15" rowspan="3">
<img src="http://youthonthemovebookclub.com/images/yotmb_04.jpg" width="738" height="88" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="3" alt=""></td>
</tr>
<tr>
<td rowspan="13">
<img src="http://youthonthemovebookclub.com/images/yotmb_05.jpg" width="6" height="720" alt=""></td>
<td colspan="3">
<a href="http://www.youthonthemovebookclub.com">
<img src="http://youthonthemovebookclub.com/images/YOTMB.jpg" width="111" height="35" border="0" alt=""></a></td>
<td rowspan="2">
<img src="http://youthonthemovebookclub.com/images/yotmb_07.jpg" width="16" height="85" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="35" alt=""></td>
</tr>
<tr>
<td colspan="3">
<img src="http://youthonthemovebookclub.com/images/yotmb_08.jpg" width="111" height="50" alt=""></td>
<td colspan="3">
<img src="http://youthonthemovebookclub.com/images/yotmb_09.jpg" width="153" height="50" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="50" alt=""></td>
</tr>
<tr>
<td colspan="5" rowspan="3">
<img src="http://youthonthemovebookclub.com/images/sidebarheaderone.jpg" width="229" height="36" alt=""></td>
<td colspan="4">
<img src="http://youthonthemovebookclub.com/images/yotmb_11.jpg" width="131" height="10" alt=""></td>
<td colspan="2" rowspan="2">
<a href="http://www.youthonthemovebookclub.com/bookreviews">
<img src="http://youthonthemovebookclub.com/images/reviews.jpg" width="96" height="27" border="0" alt=""></a></td>
<td rowspan="5">
<img src="http://youthonthemovebookclub.com/images/yotmb_13.jpg" width="10" height="61" alt=""></td>
<td colspan="3" rowspan="2">
<a href="http://www.youthonthemovebookclub.com/authorinterviews">
<img src="http://youthonthemovebookclub.com/images/interviews.jpg" width="103" height="27" border="0" alt=""></a></td>
<td rowspan="5">
<img src="http://youthonthemovebookclub.com/images/yotmb_15.jpg" width="13" height="61" alt=""></td>
<td rowspan="4">
<a href="http://www.youthonthemovebookclub.com/readingroom">
<img src="http://youthonthemovebookclub.com/images/reading.jpg" width="79" height="45" border="0" alt=""></a></td>
<td rowspan="4">
<a href="http://www.youthonthemovebookclub.com/join">
<img src="http://youthonthemovebookclub.com/images/join.jpg" width="58" height="45" border="0" alt=""></a></td>
<td>
<img src="http://youthonthemovebookclub.com/images/yotmb_18.jpg" width="62" height="10" alt=""></td>
<td colspan="2" rowspan="3">
<img src="http://youthonthemovebookclub.com/images/sidebarheadingtwo.jpg" width="232" height="36" alt=""></td>
<td rowspan="11">
<img src="http://youthonthemovebookclub.com/images/yotmb_20.jpg" width="5" height="635" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="10" alt=""></td>
</tr>
<tr>
<td rowspan="4">
<img src="http://youthonthemovebookclub.com/images/yotmb_21.jpg" width="1" height="51" alt=""></td>
<td colspan="2">
<a href="http://www.youthonthemovebookclub.com/home">
<img src="http://youthonthemovebookclub.com/images/home.jpg" width="61" height="17" border="0" alt=""></a></td>
<td>
<a href="http://www.youthonthemovebookclub.com/founder">
<img src="http://youthonthemovebookclub.com/images/founder.jpg" width="69" height="17" border="0" alt=""></a></td>
<td rowspan="2">
<a href="http://www.youthonthemovebookclub.com/contact">
<img src="http://youthonthemovebookclub.com/images/contact.jpg" width="62" height="26" border="0" alt=""></a></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="17" alt=""></td>
</tr>
<tr>
<td colspan="5" rowspan="3">
<img src="http://youthonthemovebookclub.com/images/yotmb_25.jpg" width="226" height="34" alt=""></td>
<td colspan="3" rowspan="3">
<img src="http://youthonthemovebookclub.com/images/yotmb_26.jpg" width="103" height="34" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="9" alt=""></td>
</tr>
<tr>
<td colspan="5" rowspan="2">
<img src="http://youthonthemovebookclub.com/images/yotmb_27.jpg" width="229" height="25" alt=""></td>
<td colspan="3" rowspan="2">
<img src="http://youthonthemovebookclub.com/images/yotmb_28.jpg" width="294" height="25" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="9" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="http://youthonthemovebookclub.com/images/yotmb_29.jpg" width="137" height="16" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="16" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="http://youthonthemovebookclub.com/images/yotmb_30.jpg" width="8" height="9" alt=""></td>
<td width="221" height="535" colspan="3" rowspan="3" bgcolor="#D47727"><font face="arial"><center><a href="http://www.familyreading.org/">Family Reading</a><br>
<a href="http://www.child2000.org">Child/2000</a><br>
<a href="http://www.standards.dfes.gov.uk/primary/">Standards</a><br>
<a href="http://www.readfaster.com/">The Literacy Company</a><br>
<a href="http://www.learningpt.org/page.php?pageID=243">Learning Point</a><br>
<a href="http://www.booksonline.com/">Books On-Line</a><br>
<a href="http://www.literacyworks.org/lw/home.html?flash">Literacy Works</a><br>
<a href="http://www.teenreads.com/">Teen Reads</a><br>
<a href="http://www.hiphopcaucus.org/">Hip Hop Caucus</a><br>
<a href="http://www.hsan.org/Content/Home.aspx?pageId=241">Hip Hop Summit</a><br>
<a href="http://www.netvibes.com/hiphopassociation#H2A">Hip Hop Association</a><br></center></font></td>
<td width="552" height="535" colspan="14" rowspan="3" bgcolor="#FFFFFF"><font face="arial"><center>
<TABLE cellSpacing="0" cellPadding="0" width="95%" border="0">
<TBODY>
<TR>
<TD vAlign="top" align="middle" width="100%"><DIV align="center">
<p>YBMC </p>
<p>P.O. Box 922421 <BR>
Norcross , Ga 30010 </p>
<p>E-Mail: <A href="mailto:info@youthonthemovebokclub.com">info@youthonthemovebokclub.com </A></p>
</DIV></TD>
<TD vAlign="top" width="0%"><DIV align="justify"></DIV></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing="0" cellPadding="0" width="95%" border="0">
<TBODY>
<TR>
<TD align="center"><IMG height="1" alt="" src="widgets/spacer.gif" width="10"></TD>
<TD vAlign="top" align="center"><A href="http://www.mapquest.com/maps/map.adp?address=P.O.%20Box%20922421&zipcode=30010&state=Ga&city=Norcross&country=US">Search Location on a Map </A><BR></TD>
</TR>
<TR>
<TD vAlign="top" align="center" colSpan="2"><BR>

E-mail us by filling out the form below: </TD>
</TR>
</TBODY>
</TABLE>
<blockquote>
<form name="form1" method="post" action="">
<span id="sprytextfield1">
<label>Name:
<input type="text" name="Name" id="Name">
</label>
</span>
</form>
<form name="form2" method="post" action="">
<span id="sprytextfield2">
<label>E-Mail:
<input type="text" name="email" id="email">
</label>
</span>
</form>
<form name="form3" method="post" action="">
<span id="sprytextarea1">
<label>Comments/Questions:
<textarea name="comments" id="comments" cols="45" rows="5"></textarea>
</label>
</span>
</form>
<form name="form4" method="post" action="">
<label>Submit
<input type="submit" name="submit" id="submit" value="Submit">
</label>
<label>Reset
<input type="submit" name="Reset" id="Reset" value="Submit">
</label>
</form>
<form name="form3" method="post" action="">
</form>
<form name="form2" method="post" action="">
</form>
<form name="form1" method="post" action="">
</form>
</blockquote>
</center></font></td>
<td width="225" height="535" rowspan="3" bgcolor="#D47727"><font face="arial"><center>Coming Soon!<font></center></td>
<td rowspan="6">
<img src="http://youthonthemovebookclub.com/images/yotmb_34.jpg" width="7" height="574" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="9" alt=""></td>
</tr>
<tr>
<td>
<img src="http://youthonthemovebookclub.com/images/yotmb_35.jpg" width="1" height="4" alt=""></td>
<td rowspan="5">
<img src="http://youthonthemovebookclub.com/images/yotmb_36.jpg" width="7" height="565" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="4" alt=""></td>
</tr>
<tr>
<td rowspan="4">
<img src="http://youthonthemovebookclub.com/images/yotmb_37.jpg" width="1" height="561" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="522" alt=""></td>
</tr>
<tr>
<td colspan="18">
<img src="http://youthonthemovebookclub.com/images/yotmb_38.jpg" width="998" height="19" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="19" alt=""></td>
</tr>
<tr>
<td colspan="8" rowspan="2">
<img src="http://youthonthemovebookclub.com/images/yotmb_39.jpg" width="432" height="20" alt=""></td>
<td colspan="3" rowspan="2">
<a href="http://www.youthonthemovebookclub.com/home">
<img src="http://youthonthemovebookclub.com/images/home-37.jpg" width="43" height="20" border="0" alt=""></a></td>
<td rowspan="2">
<a href="http://www.youthonthemovebookclub.com/join">
<img src="http://youthonthemovebookclub.com/images/join-38.jpg" width="39" height="20" border="0" alt=""></a></td>
<td>
<a href="http://www.youthonthemovebookclub.com/contact">
<img src="http://youthonthemovebookclub.com/images/contact-39.jpg" width="47" height="16" border="0" alt=""></a></td>
<td colspan="5" rowspan="2">
<img src="http://youthonthemovebookclub.com/images/yotmb_43.jpg" width="437" height="20" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="16" alt=""></td>
</tr>
<tr>
<td>
<img src="http://youthonthemovebookclub.com/images/yotmb_44.jpg" width="47" height="4" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="4" alt=""></td>
</tr>
<tr>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="6" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="7" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="103" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="16" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="102" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="1" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="50" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="11" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="69" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="80" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="16" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="10" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="17" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="39" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="47" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="13" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="79" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="58" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="62" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="225" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="7" height="1" alt=""></td>
<td>
<img src="http://youthonthemovebookclub.com/images/spacer.gif" width="5" height="1" alt=""></td>
<td></td>
</tr>
</table>
<!-- End ImageReady Slices -->
<script type="text/javascript">
<!--
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {isRequired:false});
var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {isRequired:false});
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {isRequired:false});
//-->
</script>
</body>
</html>


 
Melissa
post Jun 19 2008, 04:39 PM
Post #2


;)
******

Group: Duplicate
Posts: 2,374
Joined: Feb 2004
Member No: 3,760



I'm not so sure where you went wrong here, since i've never really seen a form like yours before, but here's an easy way to make the same type of form you're trying to make. I was going to write a tutorial on it sometime this summer, but here it is:

you'll need to change your index.html (or wherever you're putting the form code) to index.php.

Then, you need to create a file named process.php or something similar to that.

Here's the code to copy/paste into that:
CODE
<?php

$name = $_POST['name'];
$email = $_POST['email'];
$website = $_POST['website'];
$comment = $_POST['comment'];
$attn = $_POST['attn'];


if(!$email == "" && (!strstr($email,"@") || !strstr($email,".")))
{
echo "<h2>Invalid e-mail</h2>\n";
$badinput = "<h2>form was NOT submitted</h2>\n";
echo $badinput;
die ("Go back! ! ");
}

if(empty($name) || empty($email) || empty($comment)){
echo "<h2>Go Back - fill in all fields</h2>\n";
die ("Go back! ! ");
}

$todayis = date("l, F j, Y, g:i a");

$attn = $attn;
$subject = $attn;

$message = " $todayis [EST] \n
Attention: $attn \n
website: $website \n
comment: $comment \n
From: $name ($email)\n\
";

$from = "From: $email\r\n";


mail("YOUREMAIL", $subject, $message, $from);

?>

Thank you, your form was sent!
<br /><br />
<input type="button" onclick="history.go(-1)" style="background-color:#fff; border: 1px solid #000;" value="go back" />


Replace YOUREMAIL with your email, obviously.

Then, copy/paste this where you want your form to go:

CODE
<form action="URL OF PROCESS.PHP"
enctype="multipart/form-data" method="post">

<input type="hidden" name="attn" value="email form" />

<table border="0" width="200">
<tbody>
<tr>
<td width="70">Name:</td>
<td><input name="name" type="text" /></td>
</tr>
<tr>
<td width="70">Email (req):</td>
<td><input name="email" type="email" /></td>
</tr>
<tr>
<td width="70">Website:</td>
<td><input name="website" type="text" /></td>
</tr>
<tr>
<td width="70">Comment:</td>
<td><textarea cols="15" rows="5" name="comment"></textarea></td>
</tr>
</tbody></table>
<input type="submit" value="Submit" />
<input type="reset" value="Clear" />

</form>


copy/paste the url of process.php into "URL OF PROCESS.PHP."

That should be it.
 

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: