954,576 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

need help finding a script or tool to use for a news update program.

I made a basic website for my sons' garage band, and they want on the front page to have a box that the four of them can update with the 'latest news' - so I want it to be something they's have to log in to use, or at least enter a password to get into, and then have the 'news' they post show up on the front page of their site. Right now the page is an index.html page. I am thinking that PhP can probably do this pretty easily, but I dont know where to find a script about it, or how to configure it so that it will show the latest news articles on the home page.. Any directions or ideas?

jilly
Newbie Poster
6 posts since Mar 2005
Reputation Points: 10
Solved Threads: 0
 

do you have access to a database? if so then i wouldn't bother with loggin in, as that would be too much work for the sole purpose of adding latest news.
Create a new php page with a form use that has everything you want, and then just put a password field as one of the inputs, if the password isn't correct then don't update. if the password is correct then add it to the database.

paradox814
Posting Whiz
351 posts since Oct 2004
Reputation Points: 13
Solved Threads: 4
 
PoA
Posting Whiz in Training
237 posts since Jul 2004
Reputation Points: 26
Solved Threads: 9
 

woohoo, thanks!

Paradox, what you have posted is a bit beyond my current ability without some handholding - I will probably try the links in the next post, if not I may come back and ask you to hold my hand while walking through the php page!!

jilly
Newbie Poster
6 posts since Mar 2005
Reputation Points: 10
Solved Threads: 0
 

Database is really made for this but if you have no db, you can get pretty creative and use fopen & fwrite to write a text file to your server. The password dealy mentioned above would help as a simple authentication, nothing happens if password isn't right. So if you have a form input named mytext...

$file_name = fopen("/path/to/homedir/myfile.txt","w+");
$file = $HTTP_POST_VARS["mytext"];
fwrite($file_name,$file);
fclose($file_name);

Then your page could include the text file.
<? include 'myfile.txt'; ?>

You might make a blank file on the server to get started. Also make sure apache can write to it!!!

Good luck

barnamos
Junior Poster in Training
50 posts since Mar 2005
Reputation Points: 15
Solved Threads: 0
 

I have access to mysql databases, so I could do that, but the problem is that the only database and php I know so far came from admin'ing my vbulletins and hacking them.. LOL - I don't really know how to do one from scratch. Also the main home page is an index.html file, and I need to turn it into an index.php file I think - and I am not sure how to do that... D'oh! Any more advice??

jilly
Newbie Poster
6 posts since Mar 2005
Reputation Points: 10
Solved Threads: 0
 



Input the text for the page:

Password:

barnamos
Junior Poster in Training
50 posts since Mar 2005
Reputation Points: 15
Solved Threads: 0
 

Thanks barnamos - I am going to try this this weekend and see if I can get it to work!!

jilly
Newbie Poster
6 posts since Mar 2005
Reputation Points: 10
Solved Threads: 0
 

Oh My my.. why use PHP, Database and do so much truble...

HOw about getting it using Javascript AJAX script.. with a simple TEXT FILE...
yes...

Check this site http://www.inspiringourchildren.info/

And the source code is available at
http://www.dynamicdrive.com/dynamicindex2/ajaxticker.htm

Regards
Kiwi

kiwisites
Newbie Poster
15 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

You bumped into a 2.5 yr old thread :) !

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

socialopen is from google

justin1206
Newbie Poster
1 post since May 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You