Sorry is this is a basic question. Still learning here 😃
I am working on building an application that reads the TOC from a CD and then will populate the data into a MySQL database. This involves PHP & Javascript.
The very first time that the page is accessed I need to call a javascript function that initialises the CDDB database with my account information. My login information I am storing in a file called vars.php, which basically is just a list of variable assignments. So, for example, I have the following:
CDDBID = "myid";
CDDBTag= "mytag";
I have a file called index.php that just redirects to the main page (CDDB_Proj.php)
The problem that I have is that I want to include the vars.php file (so that I pick up my id and tag info) and then call the javascript function to initialise, and I'm struggling with that.
I know that I can call a javascript function using the onload, but that is before I can include the vars.php. Also, I tried to include the vars.php in the index.php but I guess when it gets redirected the variables are lost 🙁
So, from my index page, if I include vars.php is there a way that I can pass the CDDBID and the CDDBTag in the header line? Also, I want this information (the CDDB vars) to remain hidden since I don't want anyone to see my login credentials.
I hope that above is clear, but if any part isn't then please let me know and I can clarify 😃