MSA - Matt's Script Archive SurveyFactory - Create and publish online web surveys
 Matt's Script Archive: Random Text: Frequently Asked QuestionsView All FAQs @ MSA
  Other sites by Matt:
  - hosted form processor
  - hosted survey software
 CGI Resource Index
  - 3,000+ Perl Scripts!
 PHP Resource Index
  - 2,000+ PHP Scripts!
 chumpsoft, inc.
  - online survey software

  Matt's Script Archive
    Simple Search
    Random Text
      > FAQ 
    Free for all Links
    Random Link
    HTTP Cookie Library
    Random Image
    SSI Random Image
    TextCounter C++
    TextClock C++

Random Text Frequently Asked Questions
    1. How should I format the random text database?
1. How should I format the random text database?
Short Answer:

Any way you like. Just make sure $delimiter matches.

Long Answer:

The $delimiter variable in the variable configuration block allows you to tell the random text script how it should split up your database. For instance, by default, it is set to:

$delimiter = "\n\%\%\n";

Which, when translated by the double quoted string means a new line, followed by two percent signs and then another new line. That means, basically, just a line with two % signs between each section. This allows you to have multi-line quotes or sections of text and is the same formatting scheme used by the Unix program fortune. You could also change this to:

$delimiter = "\n";

if you wanted each quote to be on a line by itself. Just make sure the $delimiter variable matches up to the way you format your database. :: HTML Form to Email Processor
[ Linking to MSA | Advertising Opportunities | Contact Matt ]
© 1995 - 2009 Matt Wright and Matt's Script Archive, Inc.