Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 04-01-07
purple's Avatar
Affiliate
 
Join Date: Aug 2003
Location: Bristol
Posts: 2,021
Thanks: 21
Thanked 11 Times in 9 Posts
purple is an unknown quantity at this point
  WANTED - Simple Feedback / Comments Script

I have been looking for ages for a really simple feedback / review script.

I want to enable readers to add their own reviews, and for me to be able to moderate them.

I know you can get things like this on blogs like wordpress, but I want a simple say php script to add to some really simple html pages.

can anyone suggest a script.
__________________
I never know what to write My name is Martin and I am an Affiliate
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-01-07
Northern Monkey's Avatar
Member
 
Join Date: Jan 2004
Location: UK
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts
Northern Monkey is an unknown quantity at this point
  Re: WANTED - Simple Feedback / Comments Script

Ok,

This is a rough example and the easiest possible way without using tables etc etc (I think). Have a section in your code that has a form like:

PHP Code:
  echo '<form action="review.php" method="post" enctype="multipart/form-data" border="0">
        <table class="input">
          <tr><td><textarea name="general" class="input" cols=65 rows=200 wrap="PHYSICAL" style="height:500;overflow:auto;">'
;
                   if (isset(
$_POST['general'])) echo $_POST['general'];           
    echo          
'</textarea></td>
          <tr><td align="center"><input class="input" type="submit" name="submit" value="Save Changes" /></td></tr>
          </table>
        </form>'


Then when the form is submitted it opens a file and adds the text to it by running this:

$file = array('general.txt');
foreach ($file as $name => $value) {
$TName = substr($value, 0, -4);
$filename = "./messages/".$value;
if (isset($_POST['submit'])) {
// If the form has been submitted save the details to the file.
if (is_writeable($filename)) {
if (!$handle = fopen($filename,"w")) { echo "Cannot open file ($filename)"; exit; }
if (fwrite($handle, $_POST[$TName]) === FALSE) { echo "Cannot write to the file ($filename)"; exit; }
$_POST[$TName] = stripslashes($_POST[$TName]);
fclose ($handle);
} else { echo "The file is not writeable ($filename)"; exit; }
} else {
// Read the comments file and display it in the text area
if (!$wineFile = @fopen(stripslashes($filename), "r")) {
die("Can't open the file. Has it been moved/deleted?");
} else {
$_POST[$TName] = NULL;
while ($line = fgetcsv($wineFile, 2048, '<<')) {
$_POST[$TName] .= stripslashes($line[0]).'
';
}
}
}
}


Let me know if that helps as I have other ideas.

NM.
__________________
Holiday Villa In<br>
<font size=2>If it moves, kick it. If it doesn't move, kick it till it moves and hen kick it because it moved</font>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
67 Datafeed website scripts Leeky Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 0 28-09-06 06:56 PM
readers review script wanted purple Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 0 24-05-06 04:45 PM
Wanted Email Feedback Form script- with anti bot type in code purple Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 1 05-02-06 12:15 AM
Feedback wanted on new SMS scheme TxtLocal The Affiliate Marketing Lounge 14 26-09-05 10:02 PM
Add comments / review script purple Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 1 01-09-05 11:14 AM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7