php question, undefined variable
I set up this code ages ago so I could upload news to my website, I just changed hosting plans and uploaded all the same files.. but my admin section is now all messed up. I presume some of the code was too ald for my new server
Can anyone please help.. it would be much appreciated...
I get
Notice: Undefined variable: action in /home/fhlinux160/s/sitcomsoldiers.com/user/htdocs/admin/news/edit.php on line 33
here's the code line 33 in red
if($action == "edit" && isset($HTTP_POST_VARS['password'])) {
if($HTTP_POST_VARS['password'] == "skills") {
$line = $HTTP_POST_VARS['date'] . "|" . $HTTP_POST_VARS['name'];
$line .= "|" . $HTTP_POST_VARS['news'];
$line = str_replace("\r\n","<BR>",$line);
$line .= "\r\n";
$data = file('news.txt');
$data[$id] = $line;
reset($data);
$fp = fopen('news.txt','w');
foreach($data as $element) {
|