mina1234 Posted February 17, 2014 Share Posted February 17, 2014 I created the database and the tables and started to run the application to see how it works and have better understanding of how the code works, but I received this error: An error occurred in script 'C:\XAMPP\htdocs\discounts\html\register.php' on line 16:require(/path/to/dir/mysql.inc.php): failed to open stream: No such file or directory My guess is I should replace this code require (MYSQL); with something else because this code is in line 16. I tried to move this file mysql.inc.php to the includes folder and then use this following code instead : include('./includes/mysql.inc.php'); But it did not work I see that this require (MYSQL); exist in many places, so I need to know how to handle that. If anyone can help, it will be really appreciated. Thanks Mina Link to comment Share on other sites More sharing options...
Larry Posted February 18, 2014 Share Posted February 18, 2014 The require(MYSQL) is just fine. The problem is that you've defined the MYSQL constant to be the literal string "/path/to/dir/mysql.inc.php". You need to assign to the constant the actual path to the file. Link to comment Share on other sites More sharing options...
Recommended Posts