form help!


Hey guys,

So I have an admin panel on this site, where you can Add a link to the Links page by simply putting the information into two text boxes.

print "<a href="".$_POST['linkurl']."" target="_blank">".$_POST['linkname']."</a>"

linkurl is the text box where you write the link URL.
linkname is the text box where you write the link name.

The script works fine, it prints to my page and the link works great. The problem I am having is that every time I try to add a new link, it overwrites the old one.

I’m pretty sure I need to use a foreach loop but I don’t really know how to set it up properly. Can someone please give me a little direction?



First off what are you using to save this information. A text file, database?

Second, please show the code that is adding this information either to the text file or database

With this information will be able to give you a more useful answer.


Like Ragster00 mentions, how are you storing your data and how are you processing it? Are you for instance storing your info in a database, but using an UPDATE query, rather than an INSERT query?