Current location: Hot Scripts Forums » Programming Languages » PHP » Do PHP can make a user base update web site whitout Database?


Do PHP can make a user base update web site whitout Database?

Reply
  #1 (permalink)  
Old 01-05-05, 06:30 AM
explorer1979 explorer1979 is offline
New Member
 
Join Date: Jan 2005
Location: Hong Kong, China
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Do PHP can make a user base update web site whitout Database?

Hi all,

I am newbie on Programming, now, I self-learning build web site.

I want to ask, do PHP can make a user base (only need this user name and password, without database manage like mysql etc, since my web host don't provide a database like mysql etc for me to development the web site) update web site without database?

My need is very simply, just need make a page for this user login, and then enter some text base content with some photo and some text control like , [ul][li][/li][/ul] etc for the text position etc. and then update and add the text to the page. Of course, the user can del the post and change the content as need in future too.

The text edit interface is better like this www.programmingtalk.com's messeng post interface can let you choose the text is bold, add list etc, how to do this interface in PHP with database, it is really important for me this newbie, I also want to know how to learning and do like this.

I want to ask, do anyone know how to do like this? or where can find the example PHP code, and the keyword of like this search is what?

Sorry of my poor English

thx for your time to read my post :-)
__________________
http://www.wusogorphoto.net/
A great photography web site :-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-05-05, 08:52 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,551
Thanks: 2
Thanked 16 Times in 15 Posts
yes, php does have support for non-database systems like this.

I use a flat text file for storing my usernames, passwords, and some basic information. This method is pretty good for a small number of users, but another above, what, 1000?, and you might want to consider upgrading to a real database.

Anyway, I posted the code in this thread this morning ( http://www.programmingtalk.com/showthread.php?t=15558 ) but incase you dont' feel like going there, here it is again.

PHP Code:

$filename "../intranet-users.txt.php";

$userline $newuser."|".md5($newpass)."\r\n";
$handle fopen($filename'a');
if (
fwrite($handle$userline)) { echo "User account successfully created!"; }
fclose($handle); 
$filename = of course, the filename
$userline = creates the line that will be stored. Remember to include \r\n to start a new line at the end of the current.
$handle = opens the connection to the file. If the file doesn't exist, then it's created (provided you have permissions)
fwrite = adds the line
fclose = closes the connection

That code above createst the file that will store the username and password. I used the "|" character to seperate fields, but you can use anything unique. Then, it's a matter of reading the file. I use md5 encryption to protect the passwords and works pretty well.
__________________
Yep, it's a signature...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-05-05, 11:53 AM
welbis welbis is offline
New Member
 
Join Date: Jan 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
its better to use a db imo, go to www.freenukehosting.com for the best free host ive seen...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 01-05-05, 03:25 PM
phprogramming phprogramming is offline
Wannabe Coder
 
Join Date: Nov 2004
Posts: 214
Thanks: 0
Thanked 0 Times in 0 Posts
yeah it would work writing it to a text file, but it could get quite large depending on how many posts you have from users and how man users you have, and it would also be not very secure because if the file gets deleted by accident or your sever gets hacked you are screwed. pm and i can get you cheap or free hosting on my server
__________________
Source Code Talk - Programming Discussion, Tutorials, and More!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 01-06-05, 08:33 AM
explorer1979 explorer1979 is offline
New Member
 
Join Date: Jan 2005
Location: Hong Kong, China
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
thx all reply my messenger, special thx to bizzar528 provide the code for me this newbie :-)

I only need one to three user for post/ renew the text.
So this will not development to 1000 user.

And I thinking php is the bester way to do like this without database.

Thx all's help
__________________
http://www.wusogorphoto.net/
A great photography web site :-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 04-23-05, 06:08 AM
Computeraddy Computeraddy is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Idea...It should work!

Hi,

Try creating an account with Bravenet.
Those logins store up to 50 members and you can direct each member to a different page. The only problem is you'll have to update the database manually. You can delete accounts, view EVERYONE'S user name and password and change where the person is directed to at ANY time!

WOW!

Computeraddy
_____________

Please look at my web site and give me some feedback on it!

Last edited by Computeraddy; 04-23-05 at 06:08 AM. Reason: Spelling mistake!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Form to update a MySQL database? Scoobler PHP 9 09-04-08 02:41 AM
Outsourcing web design to Bulgaria - Marin Todorov gal_flower Job Offers & Assistance 4 02-14-06 09:05 PM
Need Epinions-lite system in PHP & MYSQL wali001 Job Offers & Assistance 4 01-12-04 07:02 AM


All times are GMT -5. The time now is 10:51 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.