Mail Form

  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 374

Post 3+ Months Ago

[quote="zaiah"]I created a site: http://onesportsonline.com/ that I'm hosting on go daddy. This is my first mail form. The form works somewhat. I am able to recieve and email with the visitors name and email address and a comment. HOWEVER, in the message box you can not put a space between words. Also after hitting the submit button an error comes up. Any help would be appreciated with this.

Here's the php
Code: [ Select ]
<?php
  $request_method = $_SERVER["REQUEST_METHOD"];
  if($request_method == "GET"){
   $query_vars = $_GET;
  } elseif ($request_method == "POST"){
   $query_vars = $_POST;
  }
  reset($query_vars);
  $t = date("U");

  $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
  $fp = fopen($file,"w");
  while (list ($key, $val) = each ($query_vars)) {
   fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
   fputs($fp,"$val\n");
   fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
   if ($key == "redirect") { $landing_page = $val;}
  }
  fclose($fp);
  if ($landing_page != ""){
    header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
  } else {
    header("Location: http://".$_SERVER["HTTP_HOST"]."/");
  }


?>
  1. <?php
  2.   $request_method = $_SERVER["REQUEST_METHOD"];
  3.   if($request_method == "GET"){
  4.    $query_vars = $_GET;
  5.   } elseif ($request_method == "POST"){
  6.    $query_vars = $_POST;
  7.   }
  8.   reset($query_vars);
  9.   $t = date("U");
  10.   $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
  11.   $fp = fopen($file,"w");
  12.   while (list ($key, $val) = each ($query_vars)) {
  13.    fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
  14.    fputs($fp,"$val\n");
  15.    fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
  16.    if ($key == "redirect") { $landing_page = $val;}
  17.   }
  18.   fclose($fp);
  19.   if ($landing_page != ""){
  20.     header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
  21.   } else {
  22.     header("Location: http://".$_SERVER["HTTP_HOST"]."/");
  23.   }
  24. ?>


Here's the HTML associated with form:

Code: [ Select ]
<p>
<form action="/gdform.php" method="post">

<input type="hidden" name="subject" value="New E-Mail Subscriber" />

<input type="hidden" name="redirect" value="http://www.onesportsonline.com" />

<p>First Name <br/>
 <input type="text" name="FirstName" /></p>

<p>Last Name<br/>
 <input type="text" name="LastName" /></p>

<p>E-Mail<br/>
 <input type="text" name="email" /></p>

<p>Message<br/>
 <textarea name="comments" cols="50" rows="4">

</textarea></p>

<input type="submit" name="submit" value="submit"/>


</form></p>
  1. <p>
  2. <form action="/gdform.php" method="post">
  3. <input type="hidden" name="subject" value="New E-Mail Subscriber" />
  4. <input type="hidden" name="redirect" value="http://www.onesportsonline.com" />
  5. <p>First Name <br/>
  6.  <input type="text" name="FirstName" /></p>
  7. <p>Last Name<br/>
  8.  <input type="text" name="LastName" /></p>
  9. <p>E-Mail<br/>
  10.  <input type="text" name="email" /></p>
  11. <p>Message<br/>
  12.  <textarea name="comments" cols="50" rows="4">
  13. </textarea></p>
  14. <input type="submit" name="submit" value="submit"/>
  15. </form></p>
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4923
  • Loc: NY

Post 3+ Months Ago

Don't post twice.
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 374

Post 3+ Months Ago

sorry...didnt know if it was a PHP issue or an HTML issue

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 26 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.