Need to make this code work it is a php news ticker

[php]

<?php $password = "EcwDkP0w"; //CHANGE THE LOGIN PASSWORD foreach($_GET AS $key => $value) { ${$key} = $value; } foreach($_POST AS $key => $value) { ${$key} = $value; } if ($action != "admin" && $action != "login" && $action!= "temp3"){ ?> <?php } if ($action=="admin"){ ?>
::ALERT EDITOR FOR LAKE CHAMPLAIN FERRIES::
Password Required
Password:  
<?php } if ($action=="login"){ if ($pass==$password){ echo"Login successful"; $fd = fopen ("news.txt", "r"); $stuff = fread ($fd, filesize ("news.txt")); fclose ($fd); ?>
Edit Alert:
<?php echo $stuff ?>
 
<?php }else{ echo "Invalid Password"; } } if ($action=="temp3") { $cont=stripslashes($cont); $fp = fopen("news.txt", "w"); fputs($fp, $cont); fputs($fp, "\n"); fclose($fp); ?>

News Edited Successfully
<?php } ?> [/php]

this a news ticker and i want to make this work it has a admin panel from which we can update a news.txt file

Sponsor our Newsletter | Privacy Policy | Terms of Service