I am relatively new to php and I have a problem that I can't figure out regarding some scripts I found online that I wish to use to study OOP. Here is the URL:
http://www.hosting.vt.edu/tutorials/phpmysql/#about
The scripts are located under the section "Putting it all together in web-based personal address book" (at least 3/4 of the way down the page).
The scripts are entitled:
dbconnect.php
listcontacts.php
addcontact.php
editcontact.php
deletecontact.php
I reconfigged the dbconnect.php (I am not running PEAR, couldn't get it configged on my Leopard box) and am making the connection fine (I pulled data out of it to an altered version of the dbconnect.php script as a test)... but when I try to run listcontacts.php (or any of the others) I get the following error message from Safari:
"Parse error: syntax error, unexpected T_STRING in /Users/steve/Sites/address book/listcontacts.php on line 5"
Here is the code for line 5:
if ( isset($_GET['sort']) && $_GET['sort']=='firstname' ) { $_SESSION['sort'] = 'firstname'; } else { $_SESSION['sort'] = 'lastname'; }
What I'm asking is if someone would take the time to copy the scripts and run them to see if they can get them working.
Thanks
Steve C
http://www.hosting.vt.edu/tutorials/phpmysql/#about
The scripts are located under the section "Putting it all together in web-based personal address book" (at least 3/4 of the way down the page).
The scripts are entitled:
dbconnect.php
listcontacts.php
addcontact.php
editcontact.php
deletecontact.php
I reconfigged the dbconnect.php (I am not running PEAR, couldn't get it configged on my Leopard box) and am making the connection fine (I pulled data out of it to an altered version of the dbconnect.php script as a test)... but when I try to run listcontacts.php (or any of the others) I get the following error message from Safari:
"Parse error: syntax error, unexpected T_STRING in /Users/steve/Sites/address book/listcontacts.php on line 5"
Here is the code for line 5:
if ( isset($_GET['sort']) && $_GET['sort']=='firstname' ) { $_SESSION['sort'] = 'firstname'; } else { $_SESSION['sort'] = 'lastname'; }
What I'm asking is if someone would take the time to copy the scripts and run them to see if they can get them working.
Thanks
Steve C