the $data = $_POST[\'data\']; that that guy is referring to means that the you might not have register_globals turned on in his/her php.ini file. If you don\'t have it on, it would tell you that it couldn\'t find the variable that you are referring to., if it doesn\'t do this, don\'t worry about it, if it does, then you need to either turn register globals on (if you can) or make sure every variable you are trying to turn on is initialized first, as in:
[php:1:135977b415]<?php
$howold=$_POST[\'howold\'];
$havepark=$_POST[\'havepark\'];
?>[/php:1:135977b415]
etc.
as for the original problem, try and change your code to:
[php:1:135977b415]<?php
$db = mysql_connect($host, $user, $pass);
mysql_select_db($dbname,$db);
$inserted = mysql_query(\"INSERT INTO `survey_readerstudy` (`howold`,`havepark`,`fampark`,`email_address`) VALUES (\'$howold\', \'$havepark\', \'$fampark\', \'$email_address\')\",$db) or die (mysql_error());
?>[/php:1:135977b415]
that way if any error results in stopping the db from inserting the record, it will stop the page right then and there and output the error message.
if you want your page to continue only if it inserts, do this:
[php:1:135977b415]<?php
if ($inserted) { // this is the query variable of your insert into query
// insert your successful code
} elseif (!$inserted) {
// output your error message here
}
?>[/php:1:135977b415]
hope this helps