| | |||||
| ||||||||
| CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here. |
![]() |
| | LinkBack | Thread Tools |
| | #6 (permalink) |
| NamePros Regular Join Date: Mar 2006 Location: United Kingdom
Posts: 413
![]() ![]() ![]() | Here's a simple flat-file type thing i have done, i think it does what you need although please note that it includes no validation, or security measures Form Code Code: <form action="add.php" method="post"> Name: <input type="text" name="name" /> <br /> URL: <input type="text" name="url" value="http://" /> <br /> <input type="submit" value="Submit" /> </form> PHP Code: PHP Code: Lee EDIT: MySQL Create the following files: config.inc.php PHP Code: PHP Code: PHP Code: Code: CREATE TABLE `links` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` TEXT NOT NULL , `url` TEXT NOT NULL )
__________________ Linux Screenshots
Last edited by lee101; 12-27-2006 at 04:39 PM.
|
| |
| | #10 (permalink) |
| NamePros Regular Join Date: Mar 2006 Location: United Kingdom
Posts: 413
![]() ![]() ![]() | No problem, just if you've used the MySQL version then please note that it won't protect against SQL injection attacks etc. So it needs some security adding to it Lee
__________________ Linux Screenshots |
| |