php - Page Freezes When Redirecting User After Form Submit -


in php, collect information form , build email. have following code redirect user page after 200 response code.

// send email.     if (mail($recipient, $subject, $email_content, $email_headers)) {         // set 200 (okay) response code.         header('location: https://my.website.com/wp-content/uploads/2015/07/a.pdf');         exit;     } else {         // set 500 (internal server error) response code.         header("http/1.1 500 internal sever error");         echo "oops! went wrong , couldn't send message.";     } 

unfortunately, when attempt sumbit form, chrome freezes , have close tab. explanation cause , fix of issue?


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -