Page 2 of 2

Posted: Wed Jun 07, 2006 1:03 pm
by feyd
guys, we're getting quite a ways off topic here (as it pertains to the post, not the poll) .. I'd suggest we break off and create a new thread if you want to continue this debate.

Posted: Wed Jun 07, 2006 7:55 pm
by alex.barylski
Sorry Feyd...but I couldn't resist :P

I for one...enjoy re-inventing and consider myself more than capable of writting solid PHP classes/libraries even when I start from scratch...

Most PHP libraries are not so complex that the basics and even advanced topics can't be picked up quickly and implemented in your own classes...

By looking at existing code bases like d11's and phpMailer you can learn everything you need to know and more, as you can take positives from each and join them togather to form one. I do that all the time...

Thats the beauty of being last...ever heard the expression:

"The early bird may get the worm, but it's always the second mouse that gets the cheese"

Personally I've always liked that saying...as to me it suggests...fret not being first but focus more on being best

Did that even make sense? was that correct English grammar? If it is...I think I'm gonna copyright that... :P Maybe get quoted again *pulls pants up by belt line* :P

Anyways...the point... 8)

There is no harm in re-inventing the wheel...infact thats how I pretty much learned everything I know in regards to computers...I learn from the bottom up...and learn as I go...

However, when your writing production code with deadlines and such....it makes sense from a professional standpoint to maybe look into using existing codebases...

So really...it depends on what your coding and for whom...

Cheers :)

Re: Form Processing

Posted: Wed Jun 07, 2006 9:40 pm
by RobertGonzalez
cupaball wrote:Hi All,

Can someone point me in the direction to find help (tutorial or some code) in creating a php code. I have a form with First name, last name, phone, email, address, city, state, zip, and comments. I would like all the info emailed to an email address (the easy part, already done) and also write everything except the comments to a MYSQL database.

As I said, I have completed the first part using ezformmail, but I want to write the data. I have written data to database before, but I have never combine the two. If I can't use ezformmail and have to create a new php script, I will need it validate the fields before sending.
If the first part (emailing) is done, and the second part (inserting into a database) is something you have done before, and you are only talking about validating and inserting eight fields, why not build it yourself? I mean, seriously, you are talking maybe another 50 lines of code added to what you already have and it's done.

As for the poll question, this thread and poll posted a similar question and it has almost turned into a completely separate project.

Posted: Thu Jun 08, 2006 10:42 am
by cupaball
Thanks, so I can jsut add the db insertion to end of the code?

Posted: Thu Jun 08, 2006 11:32 am
by neophyte
I don't know why but I'm going to check in on this one.

1. I like learning by reading other people's code and then at some point try to make something conceptually similar. It's a valuable learning exercise.

2. I might use said code in a personal project (personal site).

3. For a professional projects where reliablity is a must, I stick with trusted and tried libaries for DB abstraction, mailing, templating and so forth. I don't see the point of rewriting all of those libraries.

Posted: Thu Jun 08, 2006 3:24 pm
by Li0rE
I never use tutorials or anything and my scripts are better than anything out there.

Posted: Thu Jun 08, 2006 4:54 pm
by RobertGonzalez
Li0rE wrote:I never use tutorials or anything and my scripts are better than anything out there.
Awesome, we found God's gift to PHP development :roll:

Sorry, it's just that your comments sounded so arrogant.

Posted: Thu Jun 08, 2006 5:27 pm
by Christopher
Li0rE wrote:I never use tutorials or anything and my scripts are better than anything out there.
From the guy who just learned about mysql_insert_id() a few days ago. ;)

I use tutorials and anything I can find and I see code every day that is doing something in a smarter way that I am currently doing it -- so I go back and refactor my code.

Posted: Thu Jun 08, 2006 6:53 pm
by Jixxor
For me, personally, coding my own libraries and such give me an edge. I'm tackling something I don't understand in an attempt to make it simpler for me in the long run, and in the process I'm learning more about the language I'm coding in. Of course I use tons of sources to help me out and give me ideas, but in the end the coding is all hand-written, no copy & paste.

I think that when a person gets used to just using what has already been written, they become somewhat of a script kiddie, copying & pasting here and there what they need - and it's a good bet that they don't understand what they're copying & pasting. Of course this isn't a good thing, this produces coders who might be able to finish up large projects, but they don't understand how they did it... as long as it works right? This produces messy code and a headache for the end user imho.

Posted: Sat Jun 10, 2006 5:14 pm
by cupaball
Well, I have completed what I set out to do but I need to add a step. I need to give the option to add the contact info to the database, something like if the box is checked then add the info. Only b/c some people may not want there info recorded.