I have a problem for getting a filename from File upload in chronoform.I need a file name for storing a name into DB. But i cann't get a filename from file upload field.
I use simple program for displaying values of filename . Before that, a filename could be empty value. I Give a sample code for my form below.
<label class="cf_label" style="width: 150px;">NAme</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_0" name="text1" type="text" />
<label class="cf_label" style="width: 150px;">FILE</label>
<input class="cf_fileinput cf_inputbox" title="" size="20" id="file_1" name="file1" type="file" />
<input value="Submit" name="button_2" type="submit" />
Phe PHP code for display file name is....
<?php
echo "<br/> <strong> Result is </strong>";
echo "<br/> Name : ".$_POST['text1'];
echo "<br/> FILE : ".$_POST['file1'];
?>
After submitting a form, i could get the following.
Result is
Name : sdsdsd
FILE :
Here, The filename could be empty. So pls provide a solution for this.
I use simple program for displaying values of filename . Before that, a filename could be empty value. I Give a sample code for my form below.
<label class="cf_label" style="width: 150px;">NAme</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_0" name="text1" type="text" />
<label class="cf_label" style="width: 150px;">FILE</label>
<input class="cf_fileinput cf_inputbox" title="" size="20" id="file_1" name="file1" type="file" />
<input value="Submit" name="button_2" type="submit" />
Phe PHP code for display file name is....
<?php
echo "<br/> <strong> Result is </strong>";
echo "<br/> Name : ".$_POST['text1'];
echo "<br/> FILE : ".$_POST['file1'];
?>
After submitting a form, i could get the following.
Result is
Name : sdsdsd
FILE :
Here, The filename could be empty. So pls provide a solution for this.