baterdene Posted February 3, 2006 Share Posted February 3, 2006 Hi,I have tried to follow the instruction below, but could not get the web forum working. Could anybody tell me what should be done if one to follow this instruction? What is a "MySQL table based on "asnforum.sql" ASCII file" (where asnforum is the forum name)?Create MySQL table based on "asnforum.sql" ASCII file. Use MySQL management software such as "PhpMyAdmin" to make this job easy. Quote Link to comment https://forums.phpfreaks.com/topic/3314-asnforum/ Share on other sites More sharing options...
fenway Posted February 3, 2006 Share Posted February 3, 2006 Huh? Sounds like they want you to run the SQL statements found in that file. Quote Link to comment https://forums.phpfreaks.com/topic/3314-asnforum/#findComment-11298 Share on other sites More sharing options...
baterdene Posted February 3, 2006 Author Share Posted February 3, 2006 Thanks for replying! MySQL Server 5.0 is running on my computer. I can open this forum's index page. But if I try to access the admin page, I get the message below:Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in c:\program files\apache group\Apache\htdocs\forum\admin.php on line 32No records found!If I try to post a new topic, I get the following message:Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in c:\program files\apache group\Apache\htdocs\forum\newtopic.php on line 83Try the last action for yourself using the link below:[a href=\"http://www.emcd.info/forum/index.php\" target=\"_blank\"]webpage[/a] Quote Link to comment https://forums.phpfreaks.com/topic/3314-asnforum/#findComment-11299 Share on other sites More sharing options...
baterdene Posted February 3, 2006 Author Share Posted February 3, 2006 I think I have solved the problem myself. However, I have a new problem. When I submit a new topic, I get the message "No posting found" instead of the topic being posted. Try for yourself what I am talking about using the link below:[a href=\"http://www.emcd.info/forum/index.php\" target=\"_blank\"]webpage[/a]Do you think there is an error in the following script and that is why I am getting this result:<?php/*___________________________________________________project : asn forum version 2.0file : newtopic.phpauthor : asn - webmaster@tourdebali.comdate : november 25th, 2004note : copyright 2004 by asn___________________________________________________*/include("config.php");include("lib.php");include("header.php");?><script LANGUAGE="JavaScript">function textCounter(field, countfield, maxlimit) {if (field.value.length > maxlimit) // if too long...trim it!field.value = field.value.substring(0, maxlimit);// otherwise, update 'characters left' counterelse countfield.value = maxlimit - field.value.length;}</script> <table width="200" border="0" cellspacing="0" cellpadding="1" bgcolor="#CCCCCC"> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="3" bgcolor="#f5f5f5"> <tr> <td class="normal" align="center"><b> <a href="index.php" class="none">Forum Home</a> </b></td> </tr> </table> </td> </tr> </table> <br> <b><span class="normal">Write your topic and welcome to Asn Forum!</span></b><br><br> <form method="post" action="addtopic.php" name="posting"> <table width="500" border="0" cellspacing="0" cellpadding="15" class="replyform" bgcolor="#FBFBF0"> <tr><td> <table width="100%" border="0" cellspacing="0" cellpadding="3"><tr> <td width="25%" class="normal"><b>Your Name<font color="#FF0000">*</font></b></td> <td width="75%"> <input type="text" name="nama"> </td> </tr> <tr> <td class="normal"><b>Email<font color="#FF0000">*</font></b></td> <td width="72%"> <input type="text" name="email" size="30"> </td> </tr> <tr> <td class="normal"><b>Homepage</b></td> <td> <input type="text" name="homepage" size="30" value="http://"> </td> </tr> <tr> <td class="normal"><b>Subject<font color="#FF0000">*</font></b></td> <td> <input type="text" name="topic" size="40"> </td> </tr> <tr> <td class="normal" valign="top"><br><br><br><b>Topic Text<font color="#FF0000">*</font></b></td> <td class="normal"> <textarea name="topictext" rows="7" cols="35" onKeyDown="textCounter(this.form.topictext,this.form.remLen,<?php echo $maxchar; ?>);" onKeyUp="textCounter(this.form.topictext,this.form.remLen,<?php echo $maxchar; ?>);"></textarea><br> Character Left: <input readonly type=text name=remLen size=3 maxlength=3 value="<?php echo $maxchar; ?>"> <table border="0" cellspacing="0" cellpadding="5"> <?php $query_smile = mysql_query("SELECT MIN(id), code, smile_url, emotion FROM forum_smile GROUP BY emotion LIMIT 0,20"); $counter = 10; while($data_smile = mysql_fetch_row($query_smile)) { if (($counter % 10) == 0) echo "<tr>"; echo "<td><a href=\"javascript:void(0);\" onClick=\"document.posting.topictext.value+='$data_smile[1] ';\"><img src=\"images/$data_smile[2]\" border=\"0\" alt=\"$data_smile[3]\"></a></td>"; if (($counter % 10) == 9) echo "</tr>"; $counter++; } ?> </table> </td> </tr> <tr> <td> </td> <td> <input type="submit" name="Submit" value="Submit"> </td> </tr> </table></tr></table></form><?php include("footer.php"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/3314-asnforum/#findComment-11300 Share on other sites More sharing options...
fenway Posted February 4, 2006 Share Posted February 4, 2006 That script doesn't do anything -- it would be that form's action that would be responsible for actually inserting a new topic. But posting the entire script is not the best way to debug this -- see what actually happens on the DB end. Quote Link to comment https://forums.phpfreaks.com/topic/3314-asnforum/#findComment-11302 Share on other sites More sharing options...
baterdene Posted February 4, 2006 Author Share Posted February 4, 2006 I have only started learning MySQL so I guess I would not find what is wrong. If you do not mind, could you try installing this forum on your system. I have provided the source below:[a href=\"http://script.tourdebali.com/asnforum.html\" target=\"_blank\"]source web page[/a] Quote Link to comment https://forums.phpfreaks.com/topic/3314-asnforum/#findComment-11313 Share on other sites More sharing options...
fenway Posted February 4, 2006 Share Posted February 4, 2006 Install the forum? Not a chance -- this is a help forum, not a tech support forum, and no one has time for that; besides, the author has posted his e-mail address ([a href=\"mailto:mailto:webmaster@tourdebali.com\"]mailto:webmaster@tourdebali.com[/a]) for bugs & errors.Like I said before, the error that you describe is being produced by the page that the form is being posted to (see the action attribute of the form tag). Take a look at that script, and begin debugging there. Initially, this will be in PHP, so your inexperience with MySQL should not make much of a difference. Besides, it's a great way to improve your skills.Good luck. Quote Link to comment https://forums.phpfreaks.com/topic/3314-asnforum/#findComment-11325 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.