Hi im kinda new at this i would like to create a small script for links on my main page for example: Home News etc.... so it saves the info entered like on the pic to a simple text file, im not using SQL. For example if link name is home and url is index.php save link as home.txt and place url inside it. If that works how do i create a small page to read all files in directory links/ and places them on the small link menu? if you dont understand what i am after place ask me Im n0ob at this //Cheers Martin
fopen() ; Open your desired file ( if file doesn't exist ..create it ) . fwrite(); use this function to write your information to a file . ( file pointed as a handle ) Now you need a function to split content of file with special chars (e.g : ' or , or | )
Why do not put this to PHP file, and edit it from there. IF you want to administrate it - you'd better use MySQL database for storage
yea . Text-File DB is dangerous and hard to programming . post here if you want use mysql . we can help you .
It's not really hard or "dangerous".. assuming it's just for links on your main page I see no real problem with it.. but either way it's not hard to program. Just have php write to a text file.. $fp = fopen('links.txt', 'a+'); $link = "<a href='http://" . $_POST['url'] . "'>". $_POST['title'] . "</a><br />"; fwrite($fp, $link); PHP: Just a quick example, obviously change depending on your needs.
Cool, but what if you need tyo change the look of the links, and they are all just hard-coded in that text-file