By errorist on
I am rendering my form in module as:
$output .= "<form name='showcase' method='post' enctype='multipart/form-data'>
<input type='text' name='field_promotion_title' id='field_promotion_title' value=\"".$node->field_promotion_title[0]['value']."\" /><br />";
$output .= "<textarea rows=5 cols=50 name='field_promotion_detail' id='field_promotion_detail'>".$node->field_promotion_detail[0]['value']."</textarea><br />";
$output .= "<input type='file' name='showcase_upload' /><br />";
$output .= "<input type='submit' name='submit_showcase' id='submit-showcase' value='Send' /></form><br />";
after form submit I use:
if( isset($_POST['submit_showcase']) ){
if($file = file_check_upload("showcase_upload")){
echo "Yes";
}else{
echo "No";
}
}
But it always return false....
Why.... ?? any clue??
Comments
You should be using the Form
You should be using the Form API to declare your forms, not hand building them like that.
Contact me to contract me for D7 -> D10/11 migrations.