PHP

Config error at my output page

  • php
  • config
  • error

3 comments

In that case, for non-compulsory field on output.php should also have the code to set all variables as a blank field.

I have already did that , on my index page no more error message but after i go into output leaving non compulsory are blanks i get the error. This is my code in my index page. 


<code>
$name = "";
$email = "";
$phone = "";
$age = "";
$website = "";
$comment = "";
</code>

Hi Mike Hunt,
This error happens because those variables are empty.

As those are optional fields, what could be done is to set all variables to "empty" at the start of the page, and it should solve the issue.

$userName = $userEmail = $userPhone = $userWebsite = $userAge = $userGender = $userComment = "";