Re: breakthrough: get record, insert on different table works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thufir wrote:
> it ain't pretty, but it's like a sugar rush!  Finally, able to enter data on
> forms which I can create :)
> 
[snip]
> 
> Any thoughts/suggestions/advice as a next step?  I need to add a timestamp when
> the data's entered, but that's a small thing.  This is adding notes onto
> craigslist rss feeds database using <http://code.google.com/p/feed-on-feeds/>,
> which is an amazing app.

The next step? Go back and refine your code so that it IS pretty. You'll
get a much better understanding of coding. Just because code works,
doesn't mean you are finished.

Two obvious things you can fix:

1. Put your database and username password (or create a function to
setup the database connection) in a separate file which gets called by
your two scripts. When your database password changes, you just need to
change the password in one place. Not a bid deal in this case, but
imagine if you had 10 pages, 100 pages, etc...

2. You need to validate user input before including it in your sql
statements.

Good luck,
Roberto

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux