greatstar00 Posted February 21, 2010 Share Posted February 21, 2010 i am going out if anyone can help here i upload the file for you NOTE: the file i upload is actually the question asker's code [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/192747-i-need-help/page/2/#findComment-1015449 Share on other sites More sharing options...
greatstar00 Posted February 21, 2010 Share Posted February 21, 2010 ok, i got what is your problem your problem is strange, u cant see by eyes, u must need extra tools such as hex editor at the beginning, i see bytes like EF BD EE (i think it is like this, i kind of forgot) i see these 3 bytes at the beginning of a few files, (include connection.php) that is wat the program sent info to browser before your header() function those 3 bytes i mentioned, it is beyond the ascii table, ascii table highest is 7F, urs is most likely unicode chars, but it is 3 bytes, then i dont know so, consider change editor, or change computer to have your programming creating new files NOTE: dont edit anything, just run it with php before u edit anything [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/192747-i-need-help/page/2/#findComment-1015536 Share on other sites More sharing options...
perseadrian Posted February 21, 2010 Share Posted February 21, 2010 i m having problem in redirecting im making content management system i get a values from posted form and then insert as an new row value is inserted correctly but i want to redirect it back to my content.php when i use header("Location: content.php"); it gives me this error when i fill form and hit submit error is "Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\widget_corp\includes\connection.php:1) in C:\xampp\htdocs\widget_corp\create_subject.php on line 14" and my code is <?php $menu_name= $_POST['menu_name']; $position = $_POST['position']; $visible = $_POST['visible']; $query = "INSERT INTO subjects ( menu_name, position, visible) Values ( '{$menu_name}',{$position},{$visible})"; if(mysql_query($query,$connection)){ header("Location: content.php"); exit; }else { echo "<p> Subject creation is failed .</p>"; echo "<p>".mysql_error()."</p>"; } please please help me out Probably is about session_start, causing an error. You must submit your header before session_start. Quote Link to comment https://forums.phpfreaks.com/topic/192747-i-need-help/page/2/#findComment-1015651 Share on other sites More sharing options...
PFMaBiSmAd Posted February 21, 2010 Share Posted February 21, 2010 Your editor is saving the files as UTF-8 encoded files and the extra characters at the start of the file are the BOM (Byte Order Mark) characters. Save the file without the BOM if you must save it as a UTF-8 encoded file OR save it as an ANSI (ASCII) encoded file. Quote Link to comment https://forums.phpfreaks.com/topic/192747-i-need-help/page/2/#findComment-1015661 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.