Error when form submit

Hi guys, i used this tutorial at treehouse to make a working form, but whenever i submit the form i get this message

Error message:

<code>
<br /> <b>Fatal error</b>: Call to undefined function http_response_code() in <b>/home/testsite.com/php/process.php</b> on line <b>37</b><br />
</code>

The message gets sent but this error shows up. Any clue on how to solve this issue. Thanks. :slight_smile:

you need to check your PHP version, http_response_code() function is supported in (PHP 5 >= 5.4.0) version

check: http://php.net/manual/en/function.http-response-code.php

Hi, thanks for your reply. Is there anyway to fix that error i am not good with PHP. Thanks :slight_smile:

what version of PHP you are using? you can check it with the hosting provider

PHP version 5.3.

follow the link pbsonawane sent.
php.net has a function to use if your php version does not include it.

Hi, i have no clue how to implement it, if you could help me i would really appreciate it. Thanks :slight_smile:

Guys i finally got it fixed with the help of someone from treehouse, i have a account there :slight_smile:

Its a shame that nobody wanted to help me with a simple problem.

Have a great day guys. cya :slight_smile:

Thereโ€™s a difference between helping someone with a problem and coding it for them. Give a man a fish โ€ฆ