admin.php:process.php:Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title></title> </head> <body> <?php if ($_POST['password']=="your_pass" && $_POST['username']=="your_user") { ?> <h1>TICKER CHANGE PAGE</h1> <h2>60 Characters Maximum INCLUDING Spaces</h2> <br /> <form action="process.php" method="post"> Ticker Text: <input type="text" value="<?php include('ticker.txt');?>" size="60" maxlength="60" name="ticker_text" /> <input type="submit" /> </form> <?php } else { $error=(isset($_POST['submitted']) && $_POST['submitted']=="yes")?"Wrong username or password. Please try again.":""; echo '<span style="font-color:red">'.$error.'</span><br />'; ?> <form method="post"> Username: <input type="text" name="username" /><br /> Password: <input type="text" name="password" /> <input type="hidden" name="submitted" value="yes"/><br /> <input type="submit" /> </form> <?php } ?> </body> </html>
and on any html page you want the ticker text:Code:<?php $ticker_text = $_POST['ticker_text']; $ticker_file = "ticker.txt"; $fh = fopen($ticker_file, 'w') or die("can't open file"); fwrite($fh, $ticker_text); fclose($fh); echo $ticker_text; ?><?php include("ticker.txt");?>e.g:Code:<html> <head> </head> <body> <div id="ticker"><?php include("ticker.txt");?></div> </body> </html>





Bookmarks