Jump to content

please help me


petchy

Recommended Posts

I got into the gaming word just under a yr ago and now ive started running my own game ive just received a new script and im so stuck can anyone help

this is the error

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/home2/usr/home/yourmsm/public_html/Gangster Legends Start/index.php:10) in /usr/home2/usr/home/yourmsm/public_html/Gangster Legends Start/index.php on line 105

 

on line 105 in index is

 

header("Location: news.php");

 

and when u look in news.php

 

$sql = "INSERT INTO news SET id = '', message = '" .mysql_real_escape_string($_POST['message']). "', name = '" .mysql_real_escape_string($name). "',ip='".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."'";

$res = mysql_query($sql);

}

 

i dont no if theres info missing as i say i am a n00b at this im probally barking up the wrong tree  :'(

but if aany oe can help it will be so appreciated thank you

Link to comment
https://forums.phpfreaks.com/topic/99700-please-help-me/
Share on other sites

It seems your index.php file is outputting data to the browser before line 105 which is preventing the header("Location: news.php"); statement from working which may be caused by white space or characters before the statement.

 

Another cause could be that if you are code is in UTF-8 (with BOM), there is always 3 invisible characters before the script even starts. You may be able to fix the problem by changing your coding or use UTF-8 without BOM. A great free program that will do this is Notepad++. Do a google search and download.

 

If you are still having troubles or do not understand what I'm on about I will need to see more/all code to help you further.

 

Good luck mate!

Link to comment
https://forums.phpfreaks.com/topic/99700-please-help-me/#findComment-510940
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.