Drezard Posted October 19, 2006 Share Posted October 19, 2006 Okay, Can someone please tell me whats wrong with these scripts:(please check www.wintersword.com thats where these scripts are actually running)Now, I finished the index.php page and then modded it a tiny bit so i could make a games.php page now the games.php page doesnt work but the index.php does. Can some one please tell me whats wrong.Heres, index.php:[CODE]<html><head><title> Welcome To Wintersword Productions </title><style type="text/css"><!--.style1 {font-size: 24px}.style2 {font-size: 36px}--></style></head><body><table width="100%" border="0"> <tr> <td><span class="style1"><span class="style2">W</span>inter<span class="style2">S</span>word <span class="style2">P</span>roductions</span></td> <td> </td> </tr></table><table width="100%" border="0"> <tr> <td width="14%"><p><a href="index.php">Home</a> <br> <a href="games.php">Games</a> <br> <a href="contact.php">Contact Us</a> <br> <a href="support.php">Support </a> <br> <a href="community.php">Community</a> <br> </td> <td width="86%"><?phperror_reporting(E_ALL); include('classes.php'); // classes.php contains all the classes $myclass = new web; $myclass->connect(); $myclass->display_information_index();?></td> </tr></table><table width="100%" border="0"> <tr> <td> </td> </tr></table></body></html>[/CODE]Heres, Games.php[CODE]<<html><head><title> Welcome To Wintersword Productions </title><style type="text/css"><!--.style1 {font-size: 24px}.style2 {font-size: 36px}--></style></head><body><table width="100%" border="0"> <tr> <td><span class="style1"><span class="style2">W</span>inter<span class="style2">S</span>word <span class="style2">P</span>roductions</span></td> <td> </td> </tr></table><table width="100%" border="0"> <tr> <td width="14%"><p><a href="index.php">Home</a> <br> <a href="games.php">Games</a> <br> <a href="contact.php">Contact Us</a> <br> <a href="support.php">Support </a> <br> <a href="community.php">Community</a> <br> </td> <td width="86%"><?phperror_reporting(E_ALL); include('classes.php'); // classes.php contains all the classes $myclass = new web; $myclass->connect(); $myclass->display_information_games();?></td> </tr></table><table width="100%" border="0"> <tr> <td> </td> </tr></table></body></html>[/CODE]Heres Classes.php:[CODE]<?phperror_reporting(E_ALL);class web{ function connect() { $user = "censored"; $pass = "censored"; $host = "localhost"; $db = "censored"; $connect = mysql_connect($host, $user, $pass) or die ("Unable to connect!"); mysql_select_db($db) or die ("Unable to select database!"); } function display_information_index() { $query = "SELECT home FROM pages"; $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); if (mysql_num_rows($result) > 0) { while($row = mysql_fetch_row($result)) { echo $row[0]; } } else { echo "No rows found!"; } } function display_information_games() { $query = "SELECT home FROM games"; $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); if (mysql_num_rows($result) > 0) { while($row = mysql_fetch_row($result)) { echo $row[0]; } } else { echo "No rows found!"; } } } ?>[/CODE]Cheers, Please help Link to comment https://forums.phpfreaks.com/topic/24438-copying-error/ Share on other sites More sharing options...
trq Posted October 19, 2006 Share Posted October 19, 2006 [quote]Can someone please tell me whats wrong with these scripts[/quote]You need to describe what is not working, any errors you may recieve and what your expected results are. Link to comment https://forums.phpfreaks.com/topic/24438-copying-error/#findComment-111248 Share on other sites More sharing options...
GremlinP1R Posted October 19, 2006 Share Posted October 19, 2006 His error[quote]Fatal error: Call to undefined method web::display_information_games() in /home/wintersw/public_html/games.php on line 40[/quote] Link to comment https://forums.phpfreaks.com/topic/24438-copying-error/#findComment-111264 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.