Film-Tech Cinema Systems
Film-Tech Forum ARCHIVE


  
my profile | my password | search | faq & rules | forum home
  next oldest topic   next newest topic
» Film-Tech Forum ARCHIVE   » Community   » Film-Yak   » PHP file upload: place file information into database (HELP) (Page 3)

 
This topic comprises 3 pages: 1  2  3 
 
Author Topic: PHP file upload: place file information into database (HELP)
Scott Jentsch
Phenomenal Film Handler

Posts: 1061
From: New Berlin, WI, USA
Registered: Apr 2003


 - posted 08-18-2008 12:16 PM      Profile for Scott Jentsch   Author's Homepage   Email Scott Jentsch   Send New Private Message       Edit/Delete Post 
I agree with Mark's comments.

A good hosting provider is a definite plus, as they will do a lot of the heavy lifting for you when it comes to the servers. You will pay for it, but what you get in return is a hosting service that will do what you need it to do.

Even if you go with a single server right now, make sure that your database calls are easy to redirect to a new server when the time comes. Your connections should be in one place, not many, so changing or distributing your calls will not be difficult later on.

Database replication is the name of the game of which you speak, and unless you are tremendously successful with your site (many millions of page views per week), you will not need replication on a well-equipped web server from a company like RackSpace or the like.

Do as much reading as you can about good database design and secure programming. This will pay dividends in the future, trust me! Trust no incoming data, either as a result of form submissions or parameters for your scripts. All incoming data should be guilty until proven innocent and never let the user see the structure of your databases or files, even in error messages (this is easier said than done, but if you get in the habit early, you won't have to go back and fix things to tighten them up later).

When it comes to load issues, the best thing you can do is to create file caches for the data that doesn't change very often. A file call is faster than a complex database call, so don't hit your database any more often than you need to. If the data for a particular band doesn't change until you change it, then destroy and re-create the file cache whenever that information changes.

An efficient caching scheme will buy you lots of horsepower on the server side of things, and you will get much more out of much less hardware. Simultaneous MySQL sessions will most likely limit you before the number of simultaneous Apache sessions.

 |  IP: Logged

Andrew McCrea
Jedi Master Film Handler

Posts: 645
From: Winnipeg, Manitoba, Canada
Registered: Nov 2000


 - posted 08-30-2008 04:08 PM      Profile for Andrew McCrea   Author's Homepage   Email Andrew McCrea   Send New Private Message       Edit/Delete Post 
Thanks for all the helpful information, I'm definitely taking it to heart in the site's evolution.

Here's a question with probably a 2-second solution: When people are entering their profile information, song lyrics, etc., in a text box, it stores correctly, but I can't get it to format the same way in the HTML output when its retrieved...

I've tried <pre> which stretches out the HTML tables and breaks the pages by keeping everything on one line.

When I retrieve it into a text box to display on an edit page, the line breaks and formatting are all there, so its in the database right... I just want it to continue the sentence on a new line instead of stretching the HTML table.

 |  IP: Logged

Mark J. Marshall
Film God

Posts: 3188
From: New Castle, DE, USA
Registered: Aug 2002


 - posted 08-30-2008 06:31 PM      Profile for Mark J. Marshall     Send New Private Message       Edit/Delete Post 
Does this work?

echo(nl2br($text));

 |  IP: Logged

Andrew McCrea
Jedi Master Film Handler

Posts: 645
From: Winnipeg, Manitoba, Canada
Registered: Nov 2000


 - posted 09-01-2008 01:56 PM      Profile for Andrew McCrea   Author's Homepage   Email Andrew McCrea   Send New Private Message       Edit/Delete Post 
That works pretty well, thanks!

I start school tomorrow and we learn ASP.net this year... Were you self taught in PHP or did you take formal learning?

 |  IP: Logged

Mark J. Marshall
Film God

Posts: 3188
From: New Castle, DE, USA
Registered: Aug 2002


 - posted 09-01-2008 09:58 PM      Profile for Mark J. Marshall     Send New Private Message       Edit/Delete Post 
I'm pretty much self taught. I started programming at about age 11 on a TI-99/4a in TI BASIC. At about age 12 we upgraded to Extended BASIC. I also fiddled around with various Apple IIs in middle and high school. Eventually around the end of high school I ended up with an Amiga 500 and started programming in Amiga BASIC.

I read books on Pascal and C late in high school, but was never able to actually use them until college when I took an Introduction to C class and got to play with a C compiler. That was about the extent of my formal programming training. PHP is structured a lot like C, so it was easy for me to pick it up and run with it. I've never used asp.net, so I don't know much about it, but I know it serves just about the same purpose as PHP.

Good luck in your class!

[Smile]

 |  IP: Logged

Andrew McCrea
Jedi Master Film Handler

Posts: 645
From: Winnipeg, Manitoba, Canada
Registered: Nov 2000


 - posted 09-06-2008 05:49 PM      Profile for Andrew McCrea   Author's Homepage   Email Andrew McCrea   Send New Private Message       Edit/Delete Post 
I really appreciate all the help and stories.

I have a question (I'm not looking for code, just a description): What kind of approach would I take to do a news feed like Facebook, where it pulls up the most recent activities of my users' favourite artists (i.e. friend) on the site?

 |  IP: Logged



All times are Central (GMT -6:00)
This topic comprises 3 pages: 1  2  3 
 
   Close Topic    Move Topic    Delete Topic    next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:



Powered by Infopop Corporation
UBB.classicTM 6.3.1.2

The Film-Tech Forums are designed for various members related to the cinema industry to express their opinions, viewpoints and testimonials on various products, services and events based upon speculation, personal knowledge and factual information through use, therefore all views represented here allow no liability upon the publishers of this web site and the owners of said views assume no liability for any ill will resulting from these postings. The posts made here are for educational as well as entertainment purposes and as such anyone viewing this portion of the website must accept these views as statements of the author of that opinion and agrees to release the authors from any and all liability.

© 1999-2020 Film-Tech Cinema Systems, LLC. All rights reserved.