Page 1 of 1

Help with planning and direction

Posted: Sat Dec 14, 2002 2:25 pm
by ScapeChris
I made a layout for a client and some very basic coding about a year ago (http://www.axiommotors.com) and since then hes screwed a lot of things up by not knowing how to edit properly. I want to build a content editor specifically for the Drivers Profile and the LINK section. How could I make a script that would allow him to input/edit the driver information, creating a link to the target frame to display in the left navigation window? Im fairly new in the PHP world, but I would love any kind of tips you all could give me.

Thanks,

Chris Jennings
Milescape.com

Posted: Sun Dec 15, 2002 1:11 am
by oldtimer
You need to store all the links in a database. Along with the links you can add the content about what this is for and a descritption. Once you have your DB in order then you can build an interface for adding, editing, deleting and of course build the viewing portion.

For example you have a DB Table named links. For the fields you have something like id(int), link_name(varchar), link_path(varchar), link_description(varchar if small enough or maybe tinytext), timestamp and you could have many many more things.

Then run your routine and call it out into something like this

Code: Select all

<?php
echo "<a href="$link_path/$link_name">$link_description</a> ";
?>
I am sure you get the picture just fine.

Forms

Posted: Sun Dec 15, 2002 2:20 am
by phpScott
If your client is directly adding info to the db through phpMyAdmin or some other tool that gives him direct access to the db you are asking for a world of trouble.

If you haven't already build him a user input page that will validate the data then insert it into the db so you know what type of info is being entered.

Every time I have a client that wants to add or edit data that is what I do with some pretty extensive error checking to make sure that the info going in is what I would expect to be entered into the db.

phpScott

Posted: Sun Dec 15, 2002 12:55 pm
by oldtimer
Yes I agree. <span style='color:red;text-decoration:blink' title='Alert a moderator!'>grilled spam</span> the path to the files could all be the same and he just has to input the name of the file. OR even better yet all he can do is change the desctiption to the file. ie version 4 to version 5.