I am VERY new to php, and have a couple of questions.
I'm assuming, and perhaps you can may correct this assumption, but I'm assuming that when building a website for php and mysql, it is common, if you have a large product database with unique product IDs, to simply call those pages from one generic php page on your website, for example, http ://www.mydomain. com/products.php?prodID=blahblah
And of course, this is assuming that you want to have all your product pages look basically the same, but with different content. So you would call the page with the aforementioned URL, and the prodID would be sent as a variable with blahblah being the value assigned to this variable. And you can then use this variable in your script to query your database appropriately.
Here's my question. For the past few hours, i was close to pulling my hair out, because it just was not working at all. I was not getting results, and for some reason, the query string in the URL was not passing to the php page properly.
It was then that I found that in order to do this, register_globals, in the php.ini file, supposedly must be set to On. Did that, and sure enough, it works. Horray!
But in the php.ini file, it says the following:
; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
So if a person leaves register_globals to OFF, how the heck do you send query strings, in the url, to your php file?
Again, I'm new at this, so maybe I'm missing something. Or maybe it is just a default setting to protect "stupid" people (often people like me) from sending their passwords or something. I dunno.
Thanks.