php - The function "header" does not work -
php - The function "header" does not work -
i have problem header. when page processed exit();
if($validate=='true') { $_session['nome'] = $nome; $_session['cognome'] = $cognome; $_session['email'] = $email; $_session['telefono'] = $telefono; $_session['cellulare'] = $cellulare; $_session['password'] = $password; $_session['societa'] = $societa; $_session['pi'] = $pi; $_session['cf'] = $tax; $controllor = md5(uniqid(rand(), true)); ob_start(); header("location: index.php?nav=8&controllor=".$controllor); ob_end_flush(); exit(); }
all variables above filled correctly , $validate equal 'true'.
firstly, using output buffering avoid writing proper code should avoided; potentially have saved this.
secondly, way using output buffering avoid header error messages, wrong. output buffering should started first thing.
with no error messages or more code work out problem, obvious suggestion remove output buffering, move functionality header function() point before output browser made.
php
Comments
Post a Comment