Forums

PHP

This topic is locked

Smart Image Processor

Posted 05 Nov 2008 02:19:19
1
has voted
05 Nov 2008 02:19:19 greg scherff posted:
I have 3 form fields with the respective names "Floorplan1, Floorplan2, Elevation"

I need only the upload from form "Elevation" to create thumbnails. Here is the script I have. Mind you, it creates thumbs for all of the forms...

<pre id=code><font face=courier size=2 id=code>&lt;?php

if (isset($_GET['GP_upload'])) {
$sip = new cGraphicMediator("upload", $ppu, "";
$sip-&gt;setComponent("Auto";
$sip-&gt;resize(468, 468, true);
$sip-&gt;overwrite = true;
$sip-&gt;saveJPEG(80);
$sip-&gt;process();
}

if (isset($_GET['GP_upload'])) {
$sipp1 = new cGraphicMediator("upload", $ppu, "Elevation";
$sipp1-&gt;setComponent("Auto";
$sipp1-&gt;resize(150, 150, true);
$sipp1-&gt;overwrite = false;
$sipp1-&gt;setMask("jpg/members/".$_SESSION["Cust_ID"]."/##name##_small.jpg";
$sipp1-&gt;saveJPEG(80);
$sipp1-&gt;process();
}
</font id=code></pre id=code>

Replies

Replied 05 Nov 2008 15:57:15
05 Nov 2008 15:57:15 greg scherff replied:
$sipp1 = new cGraphicMediator("upload", $ppu, "Elevation";
I thought that the "Elevation" would determine that form with that name would only be processed??

Reply to this topic