Jump to content

global question


jmr3460

Recommended Posts

Hi jmr3460,

 

In answer to your section question, yes you can upload files like images and data files to a MYSQL database, using the BLOB field type, however, for improved performance, it is usually better to upload files to the server and reference them in the database (ie. put the path to the file in the database and use that to find the file that you uploaded to the server).

 

And yes you can use global variables but it's not a good idea.  Here's some reading:

http://blog.case.edu/gps10/2006/07/22/why_global_variables_in_php_is_bad_programming_practice

http://c2.com/cgi/wiki?GlobalVariablesAreBad

 

Cheers

 

 

Link to comment
https://forums.phpfreaks.com/topic/149065-global-question/#findComment-782776
Share on other sites

Yea Thanks rblake81 for that reading info. Most of the second link was way over my head but I hope to come to understand those subjects and much more. One thing that does happen when reading some things like those articles is that it helps me form more questions to search out answers for. Thanks again for all of the replies. Generally after all the replies I have deduced that global variables are bad form. So for now with the limited knowledge I have now I will turn away from global variables.

Link to comment
https://forums.phpfreaks.com/topic/149065-global-question/#findComment-784731
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.