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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -