QuickForm set no values

From: Date: Thu, 30 May 2002 16:33:28 +0000
Subject: QuickForm set no values
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1523@lists.php.net to get a copy of this message
hi, i have follow code test on my local WAMP with PHP 4.2.1. on my linux server will this not run. QuickForm set no values in html. Can you help me? Thanks. Georg require_once ("HTML/QuickForm.php"); $form = new HTML_QuickForm('image2content', 'POST', $_SERVER['PHP_SELF']); $defaultValues['image_border'] = 0; $defaultValues['image_vspace'] = 3; $defaultValues['image_hspace'] = 3; $form->setDefaults( $defaultValues ); if ( $_GET[cid] ) $form->addElement('hidden', 'cid', $_GET[cid]); $form->addElement('file', 'image_file', 'Bilddatei:'); if ( $image_src ) $form->addElement('image', 'image_src', $image_src); $form->addElement('text', 'image_alt', 'Beschreibung:'); $form->addElement('text', 'image_border', 'Rahmen:'); $form->addElement('text', 'image_vspace', 'Vertikaler Abstand:'); $form->addElement('text', 'image_hspace', 'Horizontaler Abstand:'); $form->addElement('select', 'image_align', 'Ausrichtung:', array('rechts'=>'right', 'links'=>'left')); $buttons[] = &HTML_QuickForm::createElement('submit', null, 'Speichern'); #$buttons[] = &HTML_QuickForm::createElement('reset', null, 'Reset'); $form->addElementGroup($buttons); #$form->addRule('image_alt', 'Bitte geben Sie eine Beschreibung zum Bild an.', 'required'); // FILE RULES #$form->addRule('image_file', 'Cannot exceed 1776 bytes', 'maxfilesize', 1776); #$form->addRule('image_file', 'Must be XML', 'mimetype', 'text/xml'); #$form->addRule('image_file', 'Must be *.xml', 'filename', '/^.*\.xml$/'); $form->addRule('image_file', 'Required File Upload', 'uploadedfile'); // Tries to validate the form if ( $form->validate() ) { # [ ... ] } # end

« previous php.pear.general (#1523) next »