Pure PHP Upload 3 Support Product Page

Answered

File upload filename not retained when updating table

Asked 19 Mar 2014 12:03:04
1
has this question
19 Mar 2014 12:03:04 David Woolley posted:
I know this issue has been reported before in another post, but no resolution yet.
Pure PHP Upload 3.02 with DW CS6.
Update Record does not retain the filename of the uploaded file if another field in the table is updated. Insert Record works fine.

I've been trying to resolve this myself for days now but coming up against a brick wall! Endless permutations!
Filename always gets overwritten by NULL in the table.
I'm restricting file extension to zip as I will use the ZIP Processor PHP 3 after I've sorted this issue. Here is the code with the input statement included as well. No redirect yet while I troubleshoot this page.

<?php require_once('../ScriptLibrary/incPureUpload.php'); ?>
<?php 
//*** Pure PHP File Upload 3.0.1
// Process form form1
$ppu = new pureFileUpload();
$ppu->nameConflict = "uniq";
$ppu->storeType = "file";
$ppu->progressBar = "vista_look.htm";
$ppu->progressWidth = 300;
$ppu->progressHeight = 100;
$ppu->path = "../presentations_vm";
$ppu->allowedExtensions = "zip"; // "custom"
$ppu->redirectUrl = "";
$ppu->checkVersion("3.0.1");
$ppu->doUpload();
?>
<?php
// Cancel button before UPDATE RECORD - DGW
if (array_key_exists('Cancel', $_POST)) {
	header('Location: admin.php');
	exit;
}
?>
<?php
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
  $updateSQL = sprintf("UPDATE cases SET category_id=%s, museum_no=%s, case_no=%s, other_ref_no=%s, snomed=%s, icd10=%s, title=%s, patientdata=%s, grosspathology=%s, histology=%s, `comment`=%s, presentation=%s, web_url=%s, anat_diag=%s, `references`=%s WHERE case_id=%s",
                       GetSQLValueString($_POST['category_id'], "int"),
                       GetSQLValueString($_POST['museum_no'], "text"),
                       GetSQLValueString($_POST['case_no'], "text"),
                       GetSQLValueString($_POST['other_ref_no'], "text"),
                       GetSQLValueString($_POST['snomed'], "text"),
                       GetSQLValueString($_POST['icd10'], "text"),
                       GetSQLValueString($_POST['title'], "text"),
                       GetSQLValueString($_POST['patientdata'], "text"),
                       GetSQLValueString($_POST['grosspathology'], "text"),
                       GetSQLValueString($_POST['histology'], "text"),
                       GetSQLValueString($_POST['comment'], "text"),
                       GetSQLValueString($ppu->files("presentation")->fileName, "text"),
                       GetSQLValueString($_POST['web_url'], "text"),
                       GetSQLValueString($_POST['anat_diag'], "text"),
                       GetSQLValueString($_POST['references'], "text"),
                       GetSQLValueString($_POST['case_id'], "int"));

  mysql_select_db($database_connDigiPath, $connDigiPath);
  $Result1 = mysql_query($updateSQL, $connDigiPath) or die(mysql_error());
}
?>
.
.
.
<input name="presentation" type="file" id="presentation" onchange="<?php echo $ppu->getValidateCode() ?>;return document.MM_returnValue" value="<?php echo $row_rsCases['presentation']; ?>" size="32" />

Replies

Replied 30 May 2024 11:04:56
30 May 2024 11:04:56 User  replied:
it's miles a gratifying internet site.. The design seems thoroughly to your liking.. hold enthusiastic later that!. telegram中文
Replied 19 Jun 2024 10:09:19
19 Jun 2024 10:09:19 User  replied:
I'm Komal Kaur, an escort that loves to party hard and never says no to a good time with guys who can make me feel like a rock star again.
Jaipur Escorts Service
Replied 19 Aug 2024 14:49:21
19 Aug 2024 14:49:21 Lin Lin replied:
Not preserving the file name of the uploaded file can affect your work efficiency, especially when dealing with a large number of files. In this case, I usually look for tools or scripts on Telegram to see if the community has suitable alternatives.
Replied 19 Aug 2024 14:50:52
19 Aug 2024 14:50:52 Lin Lin replied:
The problem of not being able to retain the file name may affect the accuracy of data management. It is recommended to join the technical support group on Telegram For Android to communicate with other users and find a suitable solution.
Replied 19 Aug 2024 14:51:33
19 Aug 2024 14:51:33 Lin Lin replied:
For users who need to manage multiple files, the situation where the file name cannot be preserved may cause trouble. If you want to discuss this issue or find a temporary solution, you can try to find some relevant technical discussion channels on Telegram.
Replied 25 Aug 2024 19:34:18
25 Aug 2024 19:34:18 User  replied:
Just ran into a little hiccup with the file upload filename not being retained when updating the table. Anyone else experiencing this? Also, on a brighter note, don't forget about Cheddars Happy Hour—perfect way to unwind after tech troubles!
Replied 28 Aug 2024 10:12:35
28 Aug 2024 10:12:35 Lin Lin replied:
Not retaining the file upload name during table updates can be frustrating. I’ve seen similar issues discussed in Telegram中文 developer groups, where members share quick fixes and workarounds for this problem.
Replied 28 Aug 2024 10:14:15
28 Aug 2024 10:14:15 Lin Lin replied:
This seems to be a common issue among developers. Joining a relevant Telegram电脑版 group could be helpful, as there are often discussions about similar bugs and potential solutions shared by other users.
Replied 18 Sep 2024 09:50:24
18 Sep 2024 09:50:24 User  replied:
Telegram 中文 has become a key tool for academic discussions and knowledge-sharing, especially in our increasingly fragmented digital environments. As platforms evolve, it’s crucial to find spaces that maintain open, secure communication for researchers and educators. This article touches on the challenges we face in keeping intellectual discourse intact amidst this digital disruption."
Replied 18 Sep 2024 09:52:00
18 Sep 2024 09:52:00 User  replied:
With tools like Telegram, it’s easier to maintain academic communities beyond the constraints of traditional platforms. Especially when addressing the issues in higher education management mentioned in the article, finding innovative ways to collaborate and engage, whether it’s through peer networks or teaching strategies, can transform our approach to problem-solving."
Replied 18 Sep 2024 09:53:14
18 Sep 2024 09:53:14 User  replied:
I’ve noticed that platforms like Telegram中文语言包 are becoming essential for decentralized, secure communication, something that resonates deeply with this article’s discussion on digital fragmentation. As we rethink how education interacts with the digital world, having versatile tools to facilitate meaningful conversations and peer learning has never been more important."
Replied 20 Sep 2024 14:11:29
20 Sep 2024 14:11:29 User  replied:
"Telegram下载 is a great platform for developers to exchange troubleshooting tips on file handling in PHP. I’ve seen similar discussions where users encounter issues with updating records while maintaining file names. It could be useful to engage with communities on Telegram that focus on PHP, as there might be shared experiences with DW CS6 and file uploads."
Replied 20 Sep 2024 14:12:44
20 Sep 2024 14:12:44 User  replied:
What I like about Telegram中文版下载 is how it connects coders who run into challenges like this. Sometimes, finding that one piece of advice that clicks can make all the difference. In similar PHP file upload scenarios, maintaining file names during updates can be tricky, but Telegram groups often have quick and efficient solutions for these edge cases."
Replied 26 Sep 2024 08:01:06
26 Sep 2024 08:01:06 Yuval Herz replied:
Telegram is a great platform for developers facing challenges like this. By sharing your code snippets and issues in dedicated channels, you can quickly gather insights and solutions from the community.
Replied 01 Oct 2024 09:08:11
01 Oct 2024 09:08:11 tommy hardi replied:
here are websites that are really usefull for everyone:

تکنولوژی
رنگ فردا
آموزش فلوت کلید دار
قاب سیلیکونی اصل

i think it will help you too.

Reply to this topic