hi admin and chatter,
anyone have upload script html for chronocontact and show it the file..
if u have it .. pls show it to me
how to convert this suitable to chronocontact
anyone have upload script html for chronocontact and show it the file..
if u have it .. pls show it to me
how to convert this suitable to chronocontact
<html>
<head>
<title>Upload Form</title>
</head>
<body>
<form action="UploadSingle.php" method="post" enctype="multipart/form-data">
Upload a file: <input type="file" name="thefile"><br><br>
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html><!--
<?php
$aErrors = "";
if ( !empty( $thefile_name ) ) // no file selected
{
if ( ( $thefile_type == "image/gif" ) ||
( $thefile_type == "image/pjpeg" ) ||
( $thefile_type == "image/jpeg" ) ){
if ( $thefile_size < ( 1024 * 100 ) ){
$aCurBasePath = dirname( $PATH_TRANSLATED );
$aNewName = $aCurBasePath . $thefile_name;
copy( $thefile, $aNewName );
} else {
$aErrors .= "The file was too big";
}
} else {
$aErrors .= "The file was neither a gif nor a jpeg";
}
} else{
$aErrors .= "No file was selected";
}
?>
<html>
<head>
<title>Display an Uploaded Image</title>
</head>
<body>
<?php
if ( $aErrors != "" ){
print( "<b>There were errors</b>: $aErrors<br>" );
} else {
print( "The picture you uploaded:<br><br>" );
print( "<img src=\"/$thefile_name\" border=\"0\">" );
}
?>
</body>
</html>
Hi lazyyan,
is this solved ?
if not then just follow the instructions in the "File uploads" tab in the form edit page, the tooltips have more info too, you will configure Chronoforms to do the same tasks, you don't need any code except the field HTML code of course!
regards
Max
is this solved ?
if not then just follow the instructions in the "File uploads" tab in the form edit page, the tooltips have more info too, you will configure Chronoforms to do the same tasks, you don't need any code except the field HTML code of course!
regards
Max
This topic is locked and no more replies can be posted.
