Last night I made my first edit (woo hoo!). One step at a time, well two.
Cleaned up the 1st line and added the $_SESSION
Is the following correct? You can see where I commented out the session_register statements.
[php]<?php
session_start();
//* Jan3118 EdA01 - session_register deprecated, “replacement” $_SESSION[’…’]
//* - Replace <? with <?php
//* EdA01 session_register(“user”);
//* EdA01 session_register(“uname”);
//* EdA01$_SESSION = [‘user’, ‘uname’];[/php]
Just uploaded and ran the login file… It started to display the web page. Got a few pixels and then stopped. There are a few errors. I am posting them here FYI. I will research and attempt to resolve before asking for help - unless you think “this guy is going to spend hours, I’lll give him a nudge.” So, your call/judgement whether or not to jump in and assist me.
[php][01-Feb-2018 18:58:15 UTC] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/edasse2/public_html/nflc/football.class.php on line 100
[01-Feb-2018 18:58:15 UTC] PHP Deprecated: Function split() is deprecated in [fullpathname]/football.class.php on line 878
[01-Feb-2018 18:58:15 UTC] PHP Deprecated: Function split() is deprecated in [fullpathname]/football.class.php on line 884
[01-Feb-2018 18:58:15 UTC] PHP Deprecated: Function split() is deprecated in [fullpathname]/football.class.php on line 887
[01-Feb-2018 18:58:15 UTC] PHP Warning: mysql_num_rows() expects parameter 1 to be resource, null given in [fullpathname]/football.class.php on line 229
[01-Feb-2018 18:58:15 UTC] PHP Warning: mysql_num_rows() expects parameter 1 to be resource, null given in [fullpathname]/football.class.php on line 248
[01-Feb-2018 18:58:15 UTC] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in [fullpathname]/football.class.php on line 630
[01-Feb-2018 18:58:15 UTC] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in [fullpathname]/football.class.php on line 153[/php]
FYI - Some background here may help you better understand my situation. The live software is “PHP Football” (NFL pool functionality). This is a free package that I found a few years ago and installed it on my domain. There is more info on my post introducing me in the other area.
Before I do continue fixing the code…
I downloaded and installed MAMP. Servers are started. I am now reading the MAMP documentation - attempting to digest it.
Question 1: Document Root - The default is Mac HD > Applications > MAMP > htdocs
Is this where the source files are to be located? If so, is this the recommended folder, or a folder in my Documents path. I already do have a directory containing the source files.
Question 2: Since I am starting out with the live version already running on my ISP’s site, can I download the MySQL database so that I do not have to go through an install process that creates the database (the one that was included with the software I am using). The live database has data in it, so being able to download it would save me a lot of hours.
Question 3: What directory (full pathname) on my Mac will the database reside?
Question 4: Is there documentation helping change deprecated functionality? Just as you explained the solution to the errors.
Question 5: I see the PHP Tutorial section. Is there other online documentation you recommend? Books?
Thanks In Advance,
Ed