Jump to content
Larry Ullman's Book Forums

Call To Undefined Function Escape_Data()


Recommended Posts

Hello,

 

I have given up on Godaddy and WAMP.  I am back to windows and IIS. I seem to be having a  problem with the session since I always have the display showing Admin selections when I am classified as a user.  I click on logout and they do go away.  I click on the Home tab and they come back.  I try the login and I get this error

 

Fatal error: Call to undefined function escape_data() in C:\inetpub\wwwroot\ecommerce2\includes\login.inc.php on line 12

 

Any ideas are appreciated

 

Link to comment
Share on other sites

This has nothing to do with sessions. It's a call to a function that isn't defined. This, in particular, is a user-defined function, so it must be referenced before the file with the definition is included. 

Link to comment
Share on other sites

So are the source files that are downloaded complete or do they still need modifying?  I added the function to login.inc.php and it does not throw an error.  It takes me to the home page.  Then I put in a bogus email and it took me to the home page with no errors displayed.  I entered a bogus PW and it took me to the home page with no errors displayed.  It does not seem to be catching the errors - the register.php works fine with error checking, registering etc.  Not sure why these include files are not catching errors.

Link to comment
Share on other sites

The files are complete assuming you've configured your web server properly and setup the database properly. They're really intended to facilitate learning in conjunction with the book, not that you'd just drop them into a project without further consideration.

Link to comment
Share on other sites

Hi, when I started working through Larry's PHP and MySQL books a few years ago, I installed IIS on my then Windows XP PC. But I pretty soon switched to XAMPP and upgraded to Windows 7 both of which have worked perfectly for me and all Larry's code has executed properly.

 

For what it's worth.

 

Cheers.

Link to comment
Share on other sites

 Share

×
×
  • Create New...