Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

CGI script for html content management

CGI script for html content management

CGI script for html content management

Hi all, first time poster. I have a problem that I am hoping can be solved here.

I work for a company that designs websites.  I have finished one site, and after I finished it, my supervisor told me that the client we designed the site for, would like to have the ability to edit the site content. She said there was a CGI script that she used to use that allowed clients to edit text of thier pages without affecting the html code for the page, but she can't remember what it was or where she got it from(go figure). I need a CGI script that can do this. Can anybody help me out with this?

RE: CGI script for html content management

i have a file that contains my ping monitoring script
maybe you could point hosts.conf to index.html ?
that will allow you to edit the contents

<body bgcolor="darkred"><h3>Sample: <br> server to ping </h3>

$file = "hosts.conf"; // insert your filename or url here
if (!isset($_POST['submit']))
$fo = fopen($file, "r");
$fr = fread($fo, filesize($file));
if ( get_magic_quotes_gpc () ) $fr = stripslashes($fr);

$fr = str_replace("&", "&amp;", $fr);
$fr = str_replace("<", "&lt;", $fr);
$fr = str_replace(">", "&gt;", $fr);

echo "<form method='post' action='{$_SERVER['PHP_SELF']}'>
<textarea name='newfile' rows='60' cols='100'>{$fr}
<input type='submit' name='submit' value='Save' />
$fo = fopen($file, "w");
$fw = fwrite($fo, (get_magic_quotes_gpc()?stripslashes($_POST['newfile']):$_POST['newfile']));
?><h1> Editing of the Rtr & SW Ping Monitor Status</h1><h2>when completed return to the status page</h2>

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close