simplest way of webpage updating
Can any1 please tell what is the simplest way for some1 to update information without using an editor like frontpage or dreamweaver.
ideally the setup would be if i set up a form for someone to fill in, the info is saved into a text file and then replacing the existing text file in the desire page, i know you can do it with a bit of database & php/asp, but is there a simpler or easier way to achieve why im trying to do?
thx in advance
Suzanne posted this at 06:22 — 21st March 2004.
She has: 5,507 posts
Joined: Feb 2000
The easiest way is through a web-interface or using the default editing of a text file in an ftp application. But that's perhaps not the easiest for your client?
s0da posted this at 16:51 — 21st March 2004.
He has: 157 posts
Joined: Mar 2004
seems like you need a template system in place. THEN you can easily manipulate the files from a form. but i guess that would not be a simple task.
kb posted this at 19:02 — 21st March 2004.
He has: 1,380 posts
Joined: Feb 2002
I have run into a similar problem...and I created a different form for each page that needs content change, which is accessible via password and username...they go in and change what they need to when they need to. PHP/HTML/MySQL
m3rajk posted this at 20:09 — 21st March 2004.
They have: 461 posts
Joined: Jul 2003
lol. once i finish the updates to my site that's what i'm going back to
a friend wants a webpage she can update easier
i'mcreating a gui csss and tsuch for her so she can use on her site (she has a forums so i know she has php and sql, so that's gonna drive ir)
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
m3rajk posted this at 20:12 — 21st March 2004.
They have: 461 posts
Joined: Jul 2003
so umm.. short of making one i dunno what to say, i don't think there is anything you can do for a client aside form make somethign to make an easy submit to you to have you updateit witha faster response time
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
starter posted this at 13:15 — 22nd March 2004.
They have: 80 posts
Joined: Feb 2003
thx all for your responses, i thought that there just might be an easier way and i didnt know about it.
Question! , can i reconfigure some of these guess books scripts and utilise it to what i want to do , it follows the same logic right?
kb posted this at 20:49 — 22nd March 2004.
He has: 1,380 posts
Joined: Feb 2002
If you want to make it alot more complex than it has to be, yes...
do this
---Your Form Submission Script---
<?php
$dbh=mysql_connect (\"localhost\", \"username\", \"password\") or die ('Cannot connect to the database because: ' . mysql_error());
mysql_select_db (\"database_table\");
$sql = mysql_query(\"INSERT INTO data SET\"
.\" header='$header'\"
.\", body='$body'\");
if (!$sql) { echo mysql_error(); }
mysql_close($dbh);
header(\"Location: http://www.website.com/updated.html\");
?>
---The script on the page that needs updating or added to (this does added to, not replacing ---
<?php
$dbh=mysql_connect (\"localhost\", \"username\", \"password\") or die ('Cannot connect to the database because: ' . mysql_error());
mysql_select_db (\"database_table\");
$sql = mysql_query(\"SELECT * FROM data ORDER BY id DESC\");
// find out what the error is
if (!$sql) { echo mysql_error(); }
while ($qry = mysql_fetch_array($sql)) {
$header = $qry[header];
$body = $qry[body];
echo<<<DETAILS
<p class=\"title\">$header</p>
<p> $body</p>
<p class=\"line\">---------------</p>
DETAILS;
}
mysql_close($dbh);
?>
That's the exact code I use on one of my sites to display info from a dB...modify it where needed, but it works like a charm.
mjs416 posted this at 14:20 — 23rd March 2004.
They have: 127 posts
Joined: Dec 2003
That script looks good, Eskater. I am a php newbie (learning as I'm going) and I curious about the syntax of your script.
I dont see where you declare what databse and/or table you are connecting to; am I looking at something wrong?
Also, the GET or POST methods should work the same, correct?
Greg K posted this at 17:42 — 23rd March 2004.
He has: 2,145 posts
Joined: Nov 2003
<?php
$dbh=mysql_connect (\"localhost\", \"username\", \"password\") ...
?>
localhost is the name of the server where the mySQL is running
username is the username used to access the mySQL server
password is the password used to access teh mySQL server
<?php
mysql_select_db (\"database_table\");
?>
database_table is the name of the actual database to use on the server
<?php
$sql = mysql_query(\"INSERT INTO data SET\" ...
$sql = mysql_query(\"SELECT * FROM data ORDER BY id DESC\");
?>
data in both of these lines is the table that you are accessing within the database named in the mysql_select_db() command.
-Greg
starter posted this at 17:51 — 29th March 2004.
They have: 80 posts
Joined: Feb 2003
hey thx all for your replys, i ll give it a go, however i ve spoke to the my client who does have dreamweaver already installed, they will update it themselves.
I have just been playing around with bloggers and like some feedbacks on this , seems pretty easy to use .
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.