Jump to content


Photo

e-mail form help


  • Please log in to reply
3 replies to this topic

#1 Detail

Detail

    King Detail

  • Hosted
  • 7,767 posts
  • Location:Dayonic
  • Projects:Dayvi.com
  •  Blu Spy

Posted 14 October 2005 - 08:24 PM

I'm trying to make a form for people to report bugs http://www.unityison...code/report.php

so far i've got:
<?php
$headers= "From: Bug_Reports_Page\r\n";
switch($_GET["page"]){
  default:
  echo ("<form action='report.php?page=sent' method='post'>Description of Bug:<br /><textarea name='errordesc' rows='5' cols='60'></textarea><br /><input type='submit' value='Submit'></form>"); 
  //mail("bugs@unityisone.com", "New Reported Bug", "text_of_message", $headers);
  break;

  case"sent":
  echo ("Your bug report has sent.<br /><br /><i>Ta for the error squishing help</i> :)");
  break;
}
?>
I've no idea how you get the errordesc into the text_of_message part. How do i get the stuff people input into the e-mail?

(i know it does not work :p )

#2 Kravvitz

Kravvitz

    [X]HTML, CSS, & JS/DOM Adept

  • Members
  • 443 posts
  • Location:USA

Posted 14 October 2005 - 09:21 PM

Your code is odd... that switch statement....

Anyway, what you asked for is this:
$_POST['errordesc']
http://www.php.net/m...es.external.php

#3 Detail

Detail

    King Detail

  • Hosted
  • 7,767 posts
  • Location:Dayonic
  • Projects:Dayvi.com
  •  Blu Spy

Posted 14 October 2005 - 11:31 PM

Thanks, i got it working with that :shiftee:


It's now set as a drop down box dolly, so people can be on any page and report the error :p

#4 Guest_ImmoMan_*

Guest_ImmoMan_*
  • Guests

Posted 16 October 2005 - 10:19 PM

AFAIK, the default case should always be the last case in a switch. I don't know if that applies to PHP, but it's good coding practice to do it anyway.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users