cpawebmaster Posted April 30, 2010 Share Posted April 30, 2010 Hello, I have a great idea. What if you had a forum section (maybe named "Quick Answers") with topics that answer the most common problems. For example, my post was about a PHP Contact Form and my question was resolved, so a post could be similar to: Topic Title: PHP Contact Form Message: * Fields Are Required (email, firstname, lastname, city, state, and message) Fill in the areas as needed... Edit at your own risk... Here is the PHP Code: <?php $mailto = 'your@email.com' ; $subject = "Your Contact Form" ; $formurl = "http://www.yoursite.com/contact.html" ; $errorurl = "http://www.yoursite.com/error.html" ; $thankyouurl = "http://www.yoursite.com/thankyou.html" ; $uself = 0; $use_sendmailfrom = 0; $use_webmaster_email_for_from = 0; $use_utf8 = 1; $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ; $content_type = (!isset( $use_utf8 ) || ($use_utf8 == 0)) ? 'Content-Type: text/plain; charset="iso-8859-1"' : 'Content-Type: text/plain; charset="utf-8"' ; if (isset( $use_sendmailfrom ) && $use_sendmailfrom) { ini_set( 'sendmail_from', $mailto ); } $firstname = addslashes($_POST['firstname']) ; $lastname = addslashes($_POST['lastname']) ; $city = addslashes($_POST['city']) ; $state = addslashes($_POST['state']) ; $phone = addslashes($_POST['phone']) ; $email = addslashes($_POST['email']) ; $website = addslashes($_POST['website']) ; $subject = addslashes($_POST['subject']) ; $message = addslashes($_POST['message']) ; $http_referrer = getenv( "HTTP_REFERER" ); if (!isset($_POST['email'])) { header( "Location: $formurl" ); exit ; } $valid_email = (preg_match('/^[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/im', $email)) ? true : false; $valid_firstname = (!empty($firstname)) ? true : false; $valid_lastname = (!empty($lastname)) ? true : false; $valid_city = (!empty($city)) ? true : false; $valid_state = (!empty($state)) ? true : false; $valid_message = (!empty($subject) && !empty($message)) ? true : false; $fromemail = (!isset( $use_webmaster_email_for_from ) || ($use_webmaster_email_for_from == 0)) ? $email : $mailto ; if (get_magic_quotes_gpc()) { $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); while (list($key, $val) = each($process)) { foreach ($val as $k => $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][stripslashes($k)] = $v; $process[] = &$process[$key][stripslashes($k)]; } else { $process[$key][stripslashes($k)] = stripslashes($v); } } } unset($process); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "First Name: $firstname\n" . "Last Name: $lastname\n" . "City: $city\n" . "State: $state\n" . "Phone: $phone\n" . "Email: $email\n" . "Website: $website\n" . "Subject: $subject\n" . "------------------------- MESSAGE -------------------------\n\n" . $message . "\n\n------------------------------------------------------------\n" ; $headers = "From: \"$firstname\" <$fromemail>" . $headersep . "Reply-To: \"$firstname\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.15.0" . $headersep . 'MIME-Version: 1.0' . $headersep . $content_type ; if ($valid_email && $valid_firstname && $valid_lastname && $valid_city && $valid_state && $valid_message) { mail( $mailto, $subject, $messageproper, $headers ); } else { header( "Location: $errorurl" ); exit ; } header( "Location: $thankyouurl" ); exit ; ?> Here is the HTML Code: <div class="contactform"> <span style="font-size: 9pt; font-family: Verdana; color: #000000;"> <form action="contact.php" method="post"> <fieldset><legend><span style="font-size: 12px;"> CONTACT DETAILS </span></legend> <label for="firstname" class="left">First name:</label> <font color="#FF0000">*</font><input type="text" name="firstname" id="firstname" class="field" value="" maxlength="35" tabindex="1" /><br /><br /> <label for="lastname" class="left">Last name:</label> <font color="#FF0000">*</font><input type="text" name="lastname" id="lastname" class="field" value="" maxlength="35" tabindex="2" /><br /><br /> <label for="organization" class="left">Organization:</label> <font color="#FF0000"> </font><input type="text" name="organization" id="organization" class="field" value="" maxlength="45" tabindex="3" /><br /><br /> <label for="city" class="left">City:</label> <font color="#FF0000">*</font><input type="text" name="city" id="city" class="field" value="" maxlength="35" tabindex="4" /><br /><br /> <label for="state" class="left">State:</label> <font color="#FF0000">*</font><input type="text" name="state" id="state" class="field" value="" maxlength="2" tabindex="5" /><br /><br /> <label for="phone" class="left">Phone:</label> <font color="#FF0000"> </font><input type="text" name="phone" id="phone" class="field" value="" maxlength="10" tabindex="6" /><br /><br /> <label for="email" class="left">Email:</label> <font color="#FF0000">*</font><input type="text" name="email" id="email" class="field" value="" maxlength="50" tabindex="7" /><br /><br /> <label for="website" class="left">Website:</label> <font color="#FF0000"> </font><input type="text" name="website" id="website" class="field" value="" maxlength="60" tabindex="8" /><br /><br /> </fieldset> <fieldset><legend><span style="font-size: 12px;">MESSAGE DETAILS </span></legend> <label for="subject" class="left">Subject:</label> <font color="#FF0000">*</font><input type="text" name="subject" id="subject" class="field" value="" maxlength="35" tabindex="9" /><br /><br /> <label for="message" class="left">Message:</label> <font color="#FF0000"> </font><textarea name="message" id="message" cols="45" rows="10" maxlength="400" tabindex="10"></textarea><br /><br /> <input type="submit" name="submit" id="cpasubmit" class="button" value="Send Message" tabindex="11" /><br /><br /> </fieldset> </form> </span> </div> Just a GREAT idea! Thanks, CPAWebMaster - www.charityparade.org Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/ Share on other sites More sharing options...
Mchl Posted April 30, 2010 Share Posted April 30, 2010 People don't read stickies. Why do you think they would search this forum? Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1050887 Share on other sites More sharing options...
salathe Posted April 30, 2010 Share Posted April 30, 2010 Even the "common" tasks that might be considered for a "pre-answered questions" style of forum vary enough that it would most likely be better to ask and answer the "same" question many times, specific to the needs of the asker. Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1050896 Share on other sites More sharing options...
cpawebmaster Posted April 30, 2010 Author Share Posted April 30, 2010 I didn't say it should be a sticky. It should have its own Forum Section. These "General Quick Answers" are only posted by admins with no replys. Examples could be, If IE Conditional Statements, Search Bar, CAPTCHA Box, and so on. Making these problems quick, easy, copy/paste, and to the point. I noticed the search function is not the greatest. Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1050900 Share on other sites More sharing options...
cpawebmaster Posted April 30, 2010 Author Share Posted April 30, 2010 Right, that makes sense. But I was thinking more centered on general knowledge or the top 20 most common problems. I guess that's kind of a tutorial idea really... I don't know just an idea! Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1050902 Share on other sites More sharing options...
salathe Posted April 30, 2010 Share Posted April 30, 2010 quick, easy, copy/paste That would be the main problem; folks would copy/paste code expecting it to magically work for them which a lot of the time just isn't going to happen. Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1050905 Share on other sites More sharing options...
Adam Posted April 30, 2010 Share Posted April 30, 2010 As salathe said though, most problems vary enough for each user that a board like that wouldn't solve their problem. Heck some people post a PHP error clearly stating what the error is, with a line number, and still can't work it out. Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1050906 Share on other sites More sharing options...
cpawebmaster Posted April 30, 2010 Author Share Posted April 30, 2010 I was thinking more so that they would find a working (posted by the admin) version right away and try it out. Obviously for a specific detail problem they would just post in the respective section as usual. But if someone has a general problem and they are scrolling through the main forum page and see something catchy like General Knowledge Quick Answers they might check it out and not even have to post. And for my first post, the PHP Contact Form... there are so many different ways to make a working contact form, but that is one that will work for sure and is easily edited. That is a more advanced example though. Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1050908 Share on other sites More sharing options...
ignace Posted April 30, 2010 Share Posted April 30, 2010 I was thinking more so that they would find a working (posted by the admin) version right away and try it out That doesn't work because 1) Not everyone's contact form has the same requirements (or project specifics) Not everyone looks at a guestbook/contact form/forum the same way, IA and clients will teach you that. 2) Admin's will not do custom work to match your project requirements marking the tutorial obsolete for however copy-pasted it. 3) Admin's are busy enough they do not need to provide support for what they wrote 4) No-one uses the search apparently as your idea has already been suggested, which basically proves it. 5) There is already a tutorials section that can be found at http://www.phpfreaks.com (you probably didn't even knew there was such thing here) 6) If the admin's would write the code, the most people who copy-paste it will not be able to understand it (hence MrAdam's comments on error resolving) Basically all these reasons are enough to not create such topic. However if you are convinced this is such a GREAT idea I recommend you start such a forum and provide such services and direct anyone who needs help to our freelance section (that will make our freelancers happy ). Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1050933 Share on other sites More sharing options...
Mchl Posted April 30, 2010 Share Posted April 30, 2010 [...]But if someone has a general problem and they are scrolling through the main forum page and see something catchy like General Knowledge Quick Answers they might check it out and not even have to post. Did you check our 'FAQ/Code Snippet Repository' section? Ever? Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1051007 Share on other sites More sharing options...
foobarbaz Posted May 1, 2010 Share Posted May 1, 2010 You get quick answers and more people's opinions/exposure by posting in the forum anyway. Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1051352 Share on other sites More sharing options...
cpawebmaster Posted May 1, 2010 Author Share Posted May 1, 2010 Of course I have seen the tutorials section, I also said, "it is similar to a tutorial so I don't know... just an idea." That FAQ snippet idea which I did not see sounds very similar. Quote Link to comment https://forums.phpfreaks.com/topic/200245-new-forum-section-quick-answers/#findComment-1051372 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.