i have a problem with starting a session in the page that validates the user input and sends it tothe database,
when the user clicks register he gets this error
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\ads4u\data_valid_fns.php:25) in c:\inetpub\wwwroot\ads4u\register_new.php on line 89
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\inetpub\wwwroot\ads4u\data_valid_fns.php:25) in c:\inetpub\wwwroot\ads4u\register_new.php on line 89
and here is the code i wrote :
<?
$email=$HTTP_POST_VARS['email'];
$passwd=$HTTP_POST_VARS['passwd'];
$passwd2=$HTTP_POST_VARS['passwd2'];
$title=$HTTP_POST_VARS['title'];
$name1=$HTTP_POST_VARS['name1'];
$name2=$HTTP_POST_VARS['name2'];
$phone=$HTTP_POST_VARS['phone'];
$mobile=$HTTP_POST_VARS['mobile'];
$address1=$HTTP_POST_VARS['address1'];
$address2=$HTTP_POST_VARS['address2'];
$town=$HTTP_POST_VARS['town'];
$pb=$HTTP_POST_VARS['pb'];
$country=$HTTP_POST_VARS['country'];
$occupation=$HTTP_POST_VARS['occupation'];session_start();
if (!filled_out($HTTP_POST_VARS)){
echo "You Haven't filled your registeration details correctly, Please go back and try again";
exit;
}
if (!valid_email($email)){
echo "That is not a valid email address. Please go back and try again.";
exit;
}
if ($passwd != $passwd2){
echo "The passwords you entered do not match - please go back and try again.";
exit;
}
if (strlen($passwd)<6 || strlen($passwd) >16){
echo "Your password must be between 6 and 16 characters Please go back and try again.";
exit;
}
can anyone tell me please where is the problem and how to solve it,
i test those scripts on my local server IIS, i use windows XP and last version of PHP and MYSQL,
thanks
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
