Forum Moderators: coopster
File: newsupdatepage.php
<html>
<head>
<title>UPDATE NEWS</title>
</head>
<body bgcolor="black" text="lime">
<style type="text/css">
.news {
background-color: #000099;
border-color: #000099;
border-style: solid;
color: #ffff00;
}
</style>
<center>
<form action="changenews00001.php" method="post">
<h1>UPDATE PAGE</h1><br>
<nobr><input name="$newnews" class="news" value="News goes here..."></nobr>
<br>
<input type="submit" value="CHANGE" class="news">
</form>
</body>
</html>
File: changenews00001.php
<?
echo "<p>Update mode.</p>";
$cnf = fopen("updates.php","w+");
$newnews = stripslashes(htmlspecialchars($newnews));
fputs($cnf,"<? ");
fputs($cnf,"\$newnews=\"$newnews\"; ");
fputs($cnf,"?>");
fclose($cnf);
include("index.php");
?>
Note: all that update.php is, is a file to store the variable "$newnews". index.php is the index page of her site (all of this is in a root dir).
all help would be greatly appreciated.
[edited by: jatar_k at 3:25 am (utc) on May 10, 2003]
[edit reason] problems with smileys [/edit]
for one this
<input name="$newnews" class="news" value="News goes here...">
should be
<input name="newnews" class="news" value="News goes here...">
and this
fputs($cnf,"\$newnews=\"$newnews\"; ");
puzzles me a bit not quite sure what that is. I could be a little daft but the syntax looks awry. I was going to post it properly then got confused as to what you were trying to do. What exactly are you trying to write there?