JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
added examples/session.sql, metaform: added varname
authorJason Woofenden <jason183@herkamire.com>
Thu, 26 Jul 2007 08:23:03 +0000 (04:23 -0400)
committerJason Woofenden <jason183@herkamire.com>
Thu, 26 Jul 2007 08:23:03 +0000 (04:23 -0400)
examples/session.sql [new file with mode: 0644]
metaform.php
metaform/main.html
session.php

diff --git a/examples/session.sql b/examples/session.sql
new file mode 100644 (file)
index 0000000..aa44c5a
--- /dev/null
@@ -0,0 +1,13 @@
+drop table if exists wfpl_sessions;
+create table wfpl_sessions (
+       id int unique auto_increment,
+       session_key varchar(16),
+       length int,
+       expires int);
+
+drop table if exists wfpl_session_data;
+create table wfpl_session_data (
+       id int unique auto_increment,
+       session_id int,
+       name varchar(100),
+       value text);
index e6e4123..6eaa7a8 100644 (file)
@@ -29,6 +29,7 @@ require_once('code/wfpl/format.php');
 # see code/wfpl/metaform/template.html for the html templates for these elements
 $GLOBALS['types'] = array(
 #    type                  input          format        sql     
+       'varname' =>    array('textbox',     'varname',    'varchar(50)'),
        'name' =>       array('textbox',     'oneline',    'varchar(200)'),
        'textbox' =>    array('textbox',     'oneline',    'varchar(200)'),
        'int' =>        array('textbox',     'int',        'int'),
index fd70d42..df07379 100644 (file)
@@ -11,7 +11,7 @@
   <form action="~metaform_name~" method="get">
     <p>The form name should not contain any capitals or symbols (besides underscore)</p>
 
-    <p>Form name: <input type="text" name="form_name" value="~form_name.attr~" /></p>
+    <p>Form name: <input type="text" name="form_name" value="~form_name.attr~" /> (This is used as the database table name (if any) and the basename of all the files.)</p>
 
        <h3>Features</h3>
 
index b04ed57..4bbaea9 100644 (file)
@@ -18,7 +18,7 @@
 #  along with wfpl; if not, write to the Free Software Foundation, Inc., 51
 #  Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-# you'll need this file that calles db_connect()
+# you'll need this file that calls db_connect()
 if(!isset($GLOBALS['wfpl_db_handle'])) {
        if(file_exists('db_connect.php')) {
                require_once('db_connect.php');
@@ -32,6 +32,9 @@ if(!isset($GLOBALS['wfpl_db_handle'])) {
 # and these database tables:
 # create table wfpl_sessions (id int unique auto_increment, session_key varchar(16), length int, expires int);
 # create table wfpl_session_data (id int unique auto_increment, session_id int, name varchar(100), value text);
+# run this command to install/clear the tables:
+#   mysql DATABASE_NAME < code/wfpl/examples/session.sql
+# note: you may need these parameters for mysql:  -u USERNAME -p
 
 # GLOSSARY
 #