close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File not uploading....

Thread began 9/01/2009 7:25 am by Rich Petersen | Last modified 9/01/2009 2:21 pm by Jason Byrnes | 3658 views | 7 replies |

Rich Petersen

File not uploading....

Hello!

New to DFP..... I cannot get the image to upload to server.....no errors reported.

Here is code to page.....hopefully someone can spot where I screwed up....

<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "uploads/images/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "250",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["btnfrmRegister"])){
WA_DFP_UploadFiles("WA_UploadResult1", "busimage", "2", "[NewFileName]_[Increment]", "false", $WA_UploadResult1_Params);
}
?>
<?php require_once('Connections/parentpreneursdb.php');

//let's start the session
session_start();

//now, let's register our session variables
session_register('busna*me');
session_register('busaddr');
session_register('buscity');
session_register('busstate');
session_register('buszipcode');
session_register('busphone');
session_register('busemail');
session_register('buswebsite');
session_register('busindustry');
session_register('busotherindustry');
session_register('busnewspapers');
session_register('busdesc');
session_register('buskeywords');
session_register('busmeaning');

//finally, let's store our posted values in the session variables
$_SESSION['busname'] = $_POST['busname'];
$_SESSION['busaddr'] = $_POST['busaddr'];
$_SESSION['buscity'] = $_POST['buscity'];
$_SESSION['busstate'] = $_POST['busstate'];
$_SESSION['busphone'] = $_POST['busphone'];
$_SESSION['busemail'] = $_POST['busemail'];
$_SESSION['buswebsite'] = $_POST['buswebsite'];
$_SESSION['busotherindustry'] = $_POST['busotherindustry'];
$_SESSION['busnewspapers'] = $_POST['busnewspapers'];
$_SESSION['busdesc'] = $_POST['busdesc'];
$_SESSION['buskeywords'] = $_POST['buskeywords'];
$_SESSION['busmeaning'] = $_POST['busmeaning'];
$_SESSION['buszipcode'] = $_POST['buszipcode'];




Thanks!!!

Rich

Sign in to reply to this post

Rich Petersen

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="WA_DigitalFilePro/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Parentpreneurs Registration</title>
<script src="WA_Cookies/Cookies.js"></script>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<!-- JQuery JS -->
<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>

<!-- Drop Down JS -->
<script type="text/javascript" src="js/drop_down.js"></script>

<!-- Preload Images -->
<SCRIPT language="JavaScript">
<!--
pic1 = new Image(16, 16);
pic1.src="style/loader.gif";
//-->
</SCRIPT>
<STYLE TYPE="text/css">
<!--
#county_drop_down, #no_county_drop_down, #loading_county_drop_down
{
display: none;
}
-->
</STYLE>

<STYLE TYPE="text/css">
<!--
#county_drop_down2, #no_county_drop_down2, #loading_county_drop_down2
{
display: none;
}
-->
</STYLE>
<script language='JavaScript' type='text/javascript' src='plugins/HDWRegistrationAndLogin/validatescripts.js.php'></script>
<link href="parentpreneurs.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
</head>

Sign in to reply to this post

Rich Petersen

<body>
<div id="header">
<div id="logostripe"></div>
<div id="logo">
<div align="left"><img src="images/parentpreneurs.gif" width="200" height="206" /><img src="images/entrepreneur_group_cropms.jpg" width="151" height="206" /><img src="images/Entrepreneurcollage1.jpg" width="266" height="206" hspace="25" /> <img src="images/Entrepreneurcollage.jpg" width="147" height="206" /></div>
</div>
</div>
<div id="menu">
<ul id="MainMenu" class="MenuBarHorizontal">
<li><a href="index1.php">Home</a> </li>
<li><a href="aboutus.html">About Us</a></li>
<li><a href="membership.html">Get Listed!</a></li>
<li><a href="marketplace.php">Marketplace</a></li>
<li><a href="faq.html">FAQ</a> </li>
<li><a href="links.html">Links</a></li>
<li><a href="#">Angels</a></li>
<li><a href="contactus.html">Contact Us</a></li>
</ul>
</div>
<div id="content">
<table width="954" border="0" bgcolor="#D8CBA9">
<tr>
<td width="311" valign="top"><h4>Company Target Markets</h4>
<h4> Profile Page</h4>
<p>* Required Field</p>
<p>&nbsp;</p>
<p>&nbsp;</p></td>
<td width="461" bgcolor="#CFC099"><div id="form_ProgressWrapper">
<form action="HDWRegistrationAndLogin/RegistrationAndLogin.php" method="POST" name="form" id="form" onSubmit="return HDW_validate_registration(this)">
<p>&nbsp;</p>
<table width="372" border="0" align="center">
<tr>
<td colspan="2">Please select 1 states and 2 counties you would like to target your business towards.</td>
</tr>
<tr>
<td width="89">* State</td>
<td width="273"><select id="busliststate" name="busliststate">
<option value='AL'>Alabama</option>
<option value='AK'>Alaska</option>
<option value='AZ'>Arizona</option>
<option value='AR'>Arkansas</option>
<option value='CA'>California</option>
<option value='CO'>Colorado</option>
<option value='CT'>Connecticut</option>
</select></td>
</tr>
<tr>
<td height="33">* County #1</td>
<td><div id="county_drop_down">
<select id="buslistcounty" name="buslistcounty">
<option value="">County...</option>
</select>
</div>
<span id="loading_county_drop_down"><img src="style/loader.gif" width="16" height="16" align="absmiddle" />&nbsp;Loading...</span>
<div id="no_county_drop_down">This state has no counties.</div></td>
</tr>
<tr>
<td height="33">County #2</td>
<td><div id="county_drop_down2">
<select id="buslistcounty2" name="buslistcounty2">
<option value="">County...</option>
</select>
</div>
<span id="loading_county_drop_down2"><img src="style/loader.gif" width="16" height="16" align="absmiddle" />&nbsp;Loading...</span>
<div id="no_county_drop_down2">This state has no counties.</div></td>
</tr>
<tr>
<td height="33"><p>Optional:<br />
Business Image </p></td>
<td><label>
<input name="busimage" type="file" id="busimage" value="Submit" size="25" />
</label></td>
</tr>
<tr>
<td height="33">&nbsp;</td>
<td><img src="/HDWFormCaptcha/FormCaptcha.php?width=180&height=60&letter_count=5&min_size=35&max_size=45&noise=200&noiselength=5&bcolor=ffffff&border=000000" width="180" height="60" id="captchaimg" alt="security code" border="0" /><br />
Enter Security Code:<br />
<input type="text" size="20" name="hdcaptcha" id="hdcaptcha" value="" />
<br />
<?php if (isset($_GET["hdwmsg"]) && $_GET["hdwmsg"] == "invalid") echo chr(60)."font color=red".chr(62)."Please, enter the correct security code.".chr(60)."/font".chr(62); ?>
<script type="text/javascript">function HDW_getCookie(name){ var cname = name + "=";var dc = document.cookie; dc = dc.replace(/\+/g," "); if(dc.length > 0) {begin = dc.indexOf(cname); if (begin != -1) {begin += cname.length; end = dc.indexOf(";", begin); if(end == -1) end = dc.length; var rt = dc.substring(begin, end); return unescape(rt); } } return null;}try {var items = document.getElementsByTagName("input");for(i=0;i < items.length;i++)if (items[i].name != "hdcaptcha" && items[i].name != "hdwfail" )try{var ck = HDW_getCookie("hdw_"+items[i].name);if (ck != "" && ck != null){if (items[i].type == "checkbox")items[i].checked = true;else if (items[i].type == "radio" && items[i].value == ck)items[i].checked = true; else items[i].value = ck;}} catch (e) {}var items = document.getElementsByTagName("select");for(i=0;i < items.length;i++)try{var ck = HDW_getCookie("hdw_"+items[i].name);if (ck != "" && ck != null){for (j=0;j < items[i].length;j++)if (items[i].options[j].value == ck)items[i].selectedIndex = j; }} catch (e) {}var items = document.getElementsByTagName("textarea");for(i=0;i < items.length;i++)try{var ck = HDW_getCookie("hdw_"+items[i].name);if (ck != "" && ck != null)items[i].value = ck;} catch (e) {}} catch (e) {}</script></td>
</tr>
<tr>
<td height="33">&nbsp;</td>
<td><label>
<INPUT TYPE=button VALUE="Go Back" onclick=window.history.back() />
<input type="submit" name="btnfrmRegister" id="btnfrmRegister" value="Click Here to Register!" />
</label></td>
</tr>
</table>
<input type="hidden" name="F_Name" value="<? echo $_SESSION["F_Name"] ?>" />
<input type="hidden" name="L_Name" value="<? echo $_SESSION["L_Name"] ?>" />
<input type="hidden" name="priphone" value="<? echo $_SESSION["priphone"] ?>" />
<input type="hidden" name="secphone" value="<? echo $_SESSION["secphone"] ?>" />
<input type="hidden" name="emailAddress" value="<? echo $_SESSION["emailAddress"] ?>" />
<input type="hidden" name="memberName" value="<? echo $_SESSION["memberName"] ?>" />
<input type="hidden" name="passwd" value="<? echo $_SESSION["passwd"] ?>" />
<input type="hidden" name="address" value="<? echo $_SESSION["address"] ?>" />
<input type="hidden" name="city" value="<? echo $_SESSION["city"] ?>" />
<input type="hidden" name="state" value="<? echo $_SESSION["state"] ?>" />
<input type="hidden" name="zipcode" value= "<? echo $_SESSION["zipcode"] ?>" />
<input type="hidden" name="busname" value="<? echo $_SESSION["busname"] ?>" />
<input type="hidden" name="busaddr" value="<? echo $_SESSION["busaddr"] ?>" />
<input type="hidden" name="buscity" value="<? echo $_SESSION["buscity"] ?>" />
<input type="hidden" name="busstate" value="<? echo $_SESSION["busstate"] ?>" />
<input type="hidden" name="buszipcode" value="<? echo $_SESSION["buszipcode"] ?>" />
<input type="hidden" name="busphone" value="<? echo $_SESSION["busphone"] ?>" />
<input type="hidden" name="busemail" value="<? echo $_SESSION["busemail"]?>" />
<input type="hidden" name="buswebsite" value="<? echo $_SESSION["buswebsite"] ?>" />
<input type="hidden" name="busindustry" value="<? echo implode(",", $_POST['busindustry']) ?>" />
<input type="hidden" name="busotherindustry" value="<? echo $_SESSION["busotherindustry"] ?>" />
<input type="hidden" name="busnewspapers" value="<? echo $_SESSION["busnewspapers"] ?>" />
<input type="hidden" name="busdesc" value="<? echo $_SESSION["busdesc"] ?>" />
<input type="hidden" name="buskeywords" value="<? echo $_SESSION["buskeywords"] ?>" />
<input type="hidden" name="busmeaning" value="<? echo $_SESSION["busmeaning"] ?>" />
<input type="hidden" name="hdwtablename" id="hdwtablename" value="1" />
<input type="hidden" name="hdwusername" id="hdwusername" value="memberName" />
<input type="hidden" name="hdwpassword" id="hdwpassword" value="passwd" />
<input type="hidden" name="hdwconfirm" id="hdwconfirm" value="" />
<input type="hidden" name="hdwemail" id="hdwemail" value="" />
<input type="hidden" name="hdwnook" id="hdwnook" value="http://www.parentpreneursonline.com/sorry.html" />
<input type="hidden" name="hdwactivation_email" id="hdwactivation_email" value="emailAddress" />
<input type="hidden" name="hdwok" id="hdwok" value="http://www.parentpreneursonline.com/success.html" />
<input type="hidden" name="hdwfail" id="hdwfail" value="http://www.parentpreneursonline.com/registration3.php?hdwmsg=invalid" />
<input type="hidden" name="MM_insert" value="form" />
</form>
</div>
</td>
<td width="168">&nbsp;</td>
</tr>
</table>
</div>
<div id="footer">Copyright &copy; Parentpreneurs 2009</div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MainMenu", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
<div id="form_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('form', 'form_ProgressMessageWrapper', WADFP_Theme_Options['Bar:Moab']);
</script>
<div id="form_ProgressMessage" >

<p style="margin:10px; padding:5px;" ><img src="WA_DigitalFilePro/images/moab-bar.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>

</div>
</div>
</body>
</html>

Sign in to reply to this post

Rich Petersen

Here is something much simpler that I cannot get to work either. Same symptoms.
I must be doing something stupid.

<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "uploads/images/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "250",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "file", "2", "[NewFileName]_[Increment]", "JPG:80", $WA_UploadResult1_Params);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<label>
<input type="file" name="file" id="file" value="Submit" />
<br />
<br />
<input type="submit" name="Submit" id="Submit" value="Submit" />
</label>
</form>
</body>
</html>

Sign in to reply to this post

Rich Petersen

Ok, everything is working now. Wierd...

I had to first put in a "plain jane" one. Then I added my rename and resize and it worked.

Hmmmm......

Sign in to reply to this post

Jason ByrnesWebAssist

Your form did not have the encoding type set to multipart/form-data:
<form action="HDWRegistrationAndLogin/RegistrationAndLogin.php" method="POST" name="form" id="form" onSubmit="return HDW_validate_registration(this)">


should be:
<form action="HDWRegistrationAndLogin/RegistrationAndLogin.php" method="POST" name="form" id="form" onSubmit="return HDW_validate_registration(this)" enctype="multipart/form-data">



in the future, please do not paste the entire page code into your message. Instead compress the origianl php page into a zip archive and attach the zip file.

Sign in to reply to this post

Rich Petersen

Thank you Jason,

I just did the subscription to your products and can only say "wow".

Great job....

Rich

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...