php - How to redirect my forms after submitting info? -


i got forms information sent email i'm still having issues forms webpage. when hit submit button, browser doesn't refresh page instead, goes php.file, in displays black page. i'm trying re-direct page form webpage (without using java script).

here code far including php file:

 <form method="post" action="php_email_form.php">                             <p style="font-family:arial, helvetica, sans-serif; color:#fff; font-size:12px;                              font-weight:bold"><label>first name:                                 <input type="text" name="first name" size="30" maxlength="30"                                 style="margin-left:27px"  />                             </label></p>                             <p style="font-family:arial, helvetica, sans-serif; color:#fff; font-size:12px;                              font-weight:bold"><label>last name:                                 <input type="text" name="last name" size="30" maxlength="30"                                  style="margin-left:27px"  />                             </label></p>                             <p style="font-family:arial, helvetica, sans-serif; color:#fff; font-size:12px;                              font-weight:bold"><label>phone number:                                 <input type="text" name="phone number" size="30" maxlength="10"                                   style="margin-left:5px" />                             </label></p>                             <p style="font-family:arial, helvetica, sans-serif; color:#fff; font-size:12px;                              font-weight:bold"><label>email:                                 <input type="text" name="email" size="30" maxlength="30"                                   style="margin-left:59px" />                             </label></p>                             <p style="margin-top:19px; margin-left:244px;">                                 <input type="submit" value="submit"  />                             </p>                          </form> 

php document:

 <?php  $to = 'dew02d@yahoo.com';  $subject = 'test email form';  $message= '';  foreach ($_post $key => $value)  {      $message .= $key . ': ' . $value . php_eol;  }  mail($to, $subject, $message);  ?> 

you haven't outputted php can send header redirect.

<?php  // ... send email  header('location: /backtomyform.html');  ?> 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -