X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=metaform%2Ftemplate.php;h=5a5c0eeb00bd0fea4feae02f9ecf679fd793d711;hb=c4e3ec54f995df5a6db8c497fb826f0d21d35cbc;hp=d6760cf6167002359ec4524c9c40fd1a4e58f474;hpb=e3c093250e28f834151eb6ddba5ad965a8e6651b;p=wfpl.git diff --git a/metaform/template.php b/metaform/template.php index d6760cf..5a5c0ee 100644 --- a/metaform/template.php +++ b/metaform/template.php @@ -7,7 +7,11 @@ # To send results by e-mail, all you have to do is set your e-mail address here: $GLOBALS['~form_name~_form_recipient'] = "fixme@example.com"; - + +# Set this to the path to your uploads directory. It can be relative to the +# location of this script. IT MUST END WITH A SLASH +$GLOBALS['upload_directory'] = 'uploads/'; + # To save results to a database, you'll need to create the ~form_name~ table # (the file ~form_name~.sql should help with this), and create a file called # 'db_connect.php' which calls db_connect() see: @@ -17,12 +21,14 @@ if(!file_exists('code/wfpl/template.php')) { die('This form requires db_update('~form_name~', '~db_fields~', ~php_fields~, 'id = %"', $edit_id); tem_set('did', 'updated'); } else { @@ -93,7 +104,9 @@ function ~form_name~() { } else { # form not submitted, you can set default values like so #tem_set('~always_field~', 'Yes'); - } + } + + tem_set('upload_max_filesize', upload_max_filesize()); tem_sub('form'); }