473,383 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How do I create a button for clients to upload photos on a site?

Hello,
I'm a nubie. I'm not sure if I'm N d right area. I need to create a form on my site that will have a submit button for clients so they can upload their pet photos and post realtime on the page. Is this realistic? I need an answer asap.
Thanks!
Aug 4 '10 #1
13 1942
johny10151981
1,059 1GB
What do you mean by real time?
if you mean upload time by realtime then it is realistic and the basic of web page design
Aug 4 '10 #2
thanks for replying. what I mean by realtime is that it will post right away. Here is my site : www.parkviewanimalfriends.com/contestpage.com

Here is the whole page :

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  5. <title>Photo Page</title>
  6. <script type="text/JavaScript">
  7. <!--
  8.  
  9.  
  10.  
  11. function MM_preloadImages() { //v3.0
  12.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  13.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  14.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  15. }
  16. //-->
  17. </script>
  18. <style type="text/css">
  19. <!--
  20. body {
  21.     background-color: #FFFFFF;
  22. }
  23. .style12 {
  24.     font-family: Verdana, Arial, Helvetica, sans-serif;
  25.     font-size: 18px;
  26.     font-weight: bold;
  27. }
  28. .style14 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
  29. .style15 {
  30.     font-family: Verdana, Arial, Helvetica, sans-serif;
  31.     font-size: 14px;
  32. }
  33. .style16 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; }
  34. -->
  35. </style>
  36. </head>
  37.  
  38. <body>
  39. <table width="612" height="779" border="0" align="center" background="http://bytes.com/images/photo_upload_background.jpg" bgcolor="#FFFFFF">
  40.   <tr background="http://bytes.com/images/photo_upload_background.jpg">
  41.     <th height="664" bgcolor="#CCCCCC" scope="col"><div align="center"></div>
  42.     <iframe frameborder="0" name="objectFrame" height="462" marginheight="1" marginwidth="1" scrolling="no" style="border:0px" width="500" src="/tinc?key=QhdUJ3qn&preview=1&only_object=1"></iframe>      &nbsp;</th>
  43.   </tr>
  44.   <tr>
  45.     <td height="109" align="center" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" scope="col"><p><strong><span class="style14">The winner will receive the following goodies:<br />
  46.     Free Exam &amp; Consultation, Free 10lb bag of Hills R/D diet,<br />
  47.         Phone call 
  48.         support, Weekly weigh-ins</span></strong></p>
  49.       <p><span class="style12">Share Your Pet Photo</span></p>
  50.       <p class="style15">Are you ready to share that adorable photo?<br />
  51.       Just complete this brief form, browse to the photo on your<br />
  52.       computer and click the submit button.      </p>
  53.       <p class="style15">Items marked with <b style="color: red;">*</b> are required.</p>
  54.       <div id="ctl00_MainBody_ValidationSummary1" style="color:Red;display:none;"></div>
  55.       <div id="mainContent" class="MainContent">
  56.         <div id="div" style="color:Red;display:none;"> </div>
  57.         <table width="38%">
  58.           <tr>
  59.             <td valign="top" colspan="2"><b>INFORMATION ABOUT YOU</b></td>
  60.           </tr>
  61.           <tr>
  62.             <td valign="top"> Your First Name</td>
  63.             <td valign="top"><input name="ctl00$MainBody$txtFname" type="text" maxlength="255" id="ctl00_MainBody_txtFname" style="width:190px;" />            </td>
  64.           </tr>
  65.           <tr>
  66.             <td valign="top"> Your Last Name</td>
  67.             <td valign="top"><input name="ctl00$MainBody$txtLname" type="text" maxlength="255" id="ctl00_MainBody_txtLname" style="width:190px;" />            </td>
  68.           </tr>
  69.           <tr>
  70.             <td valign="top"> Your Pet's Name</td>
  71.             <td valign="top"><input name="ctl00$MainBody$txtPetName" type="text" maxlength="255" id="ctl00_MainBody_txtPetName" style="width:190px;" />            </td>
  72.           </tr>
  73.           <tr>
  74.             <td valign="top"> Your E-mail Address <b style="color: red;">*</b></td>
  75.             <td valign="top"><input name="ctl00$MainBody$txtEmail" type="text" maxlength="255" id="ctl00_MainBody_txtEmail" style="width:190px;" />
  76.                 <span id="ctl00_MainBody_email_RequiredFieldValidator" style="color:Red;visibility:hidden;">*</span> <span id="ctl00_MainBody_emailValid_RegularExpressionValidator" style="color:Red;visibility:hidden;">*</span><br />
  77.               <span style="font-size: 9px; ">We will never sell or rent your E-mail  to anyone, ever.</span></td>
  78.           </tr>
  79.           <tr>
  80.             <td valign="top" colspan="2" style="padding-top: 15px;"><b>INFORMATION ABOUT THE PHOTO YOU WANT TO SHARE</b></td>
  81.           </tr>
  82.           <tr>
  83.             <td colspan="2" valign="top"> Upload your photo. <b style="color: red;">*</b>
  84.               <input type="file" name="ctl00$MainBody$FileUpload1" id="ctl00_MainBody_FileUpload1" style="width:265px;" />
  85.                 <span id="ctl00_MainBody_RequiredFieldFileUpload11" style="color:Red;display:none;">*</span><span id="ctl00_MainBody_RegularExpressionValidator1" style="color:Red;display:none;">*</span><span id="ctl00_MainBody_CustomValidator1" style="color:Red;display:none;">*</span> </td>
  86.           </tr>
  87.  
  88.           <tr>
  89.             <td height="54" colspan="2"><div align="center">
  90.               <input type="submit" name="www.parkviewanimalfriends.com" value="Submit" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainBody$btnSubmit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_MainBody_btnSubmit" />            
  91.             </div></td>
  92.           </tr>
  93.         </table>
  94.       </div>
  95.     </body>
  96.  
  97. </html>
  98.  
  99.       </p>
  100.     </td>
  101.   </tr>
  102. </table>
  103. <p>&nbsp;</p>
  104. <p>&nbsp;</p>
  105. <p align="center"><a href="index.html">UNDER CONSTRUCTION </a></p>
  106. </body>
  107. </html>
  108.  
  109.  
I'm not familiar with the language yet. I'm not sure how to point the submit button to the right I guess directory? Please assist to where I need to pop in the right code. Anything to make it also a tighter page. Thanks my friend.
Aug 4 '10 #3
gits
5,390 Expert Mod 4TB
whith what do you have problems exactly? as i see at he test-page you already have a upload-dialog and the user could choose a file to upload. so i guess you need help in saving that serverside somewhere?
Aug 4 '10 #4
Yes. I need help so the "submit" button will work. I guess the server side thingamajig code? Please chk the page and do a test upload. The browse button works, but the submit doesn't work...
Aug 4 '10 #5
johny10151981
1,059 1GB
This is your action form
Expand|Select|Wrap|Line Numbers
  1.       <form action="mailto:contestpage@parkviewanimalfriends.com"
  2. enctype="multipart/form-data" method="post">
  3. <p>
  4.  <P><INPUT TYPE=file NAME="html_file" ACCEPT="text/html"></P>
  5.  
  6. </p>
  7. <div>
  8.   <input type="submit" name="Submit" value="Submit" />
  9. </div>
  10. </form>
  11.  
in your form action is action="mailto:contestpage@parkviewanimalfriends.c om"
what is that even mean? are you trying to mail it directly? i think form dont support this method.

whatever you try to do with your image or other file. you need to upload them to the server and then using any server side program like php or any other you need to restore the file and then you will have to mail it or anything else.
Aug 4 '10 #6
in your form action is action="mailto:contestpage@parkviewanimalfriends.c om"
what is that even mean? are you trying to mail it directly? i think form dont support this method.
I'm not sure how to do it???

whatever you try to do with your image or other file. you need to upload them to the server and then using any server side program like php or any other you need to restore the file and then you will have to mail it or anything else.
Could someone show me or tell me in laymans term how to do it via php? Please...

Thanks!
Aug 4 '10 #7
gits
5,390 Expert Mod 4TB
you might have a look here to get started with that
Aug 4 '10 #8
May I email you directly? I really need to finish this page.
Aug 5 '10 #9
johny10151981
1,059 1GB
A Sample email code
Expand|Select|Wrap|Line Numbers
  1. $to='someone@somewhere.com';
  2. $headers  = 'MIME-Version: 1.0' . "\r\n";
  3. $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
  4.  
  5. $headers .= "To:".$to."\r\n";
  6. $headers .= 'From:me@myserver.com' . "\r\n";
  7.     $headers .="Reply-To:me@myserver.com\r\n";
  8.  
  9. $subject="pet image";
  10. $message="<html>\n"
  11. ."<body>\n"
  12. ."Dear sir,\n"
  13. ."this is your uploaded image<br \>\n"
  14. ."<img src='www.myserver.com\image\pet\pet1.jpg' width=100 height=100 \><br \>\n"
  15. ."..................\n"
  16. ."</body>"
  17. ."</html>";
  18.  
  19. mail($to,'=?UTF-8?B?'.base64_encode($subject).'?=',$message,$headers);
  20.  
Some of the codes are directly copied from my previous code. Some of the code is useless to this mail but very much useful.
Aug 5 '10 #10
Thanks johny10151981! I'm confused to how I to use the codes you replied with. The "submit" is the main issue. I need the right script for this button to work. I'm a 1st grader when it comes to where,how and what to use the codes for.

Could you specifically tell me hot to make this form work?



whatever you try to do with your image or other file. you need to upload them to the server and then using any server side program like php or any other you need to restore the file and then you will have to mail it or anything else.
Could someone show me or tell me in laymans term how to do it via php? Please...

Thanks!
Aug 6 '10 #11
johny10151981
1,059 1GB
I have a question for you:
Do you know php at all? if you dont know you need to learn PHP. And as well as you need good concept on HTML

follow the link to understand what form do
form

you can also study this link
form

Read carefully and try to understand what it does. And Please take time do not hurry.
Aug 6 '10 #12
I'll study. Thanks man!
Aug 6 '10 #13
coldfusion is another server side language that is very easy to learn. If your server/host can/does support coldfusion you'd probably have an easier time coding that yourself. it looks like HTML so it makes learning easier. feel free to e-mail me @ [edit] and I can help you out
Aug 6 '10 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Willoughby Bridge | last post by:
I am trying to create a php script to allows users to upload photos: The first file looks like this: <html> <head>
3
by: Ashish Kanoongo | last post by:
Hello There I want to generated a csv file from sql server table, in which I would like to create a asp page which display a field list with a check box. Then whatever check box I selected, and...
3
by: Mystery | last post by:
I have a Win2K server running the latest v5 IIS. If I install the .net framework, will this let me serve asp.net web pages, or do I need to upgrade to Server 2003 and IIS 6 ?? Sorry for the...
10
by: Shapper | last post by:
Hello, I am working on an ASP.NET / VB web site and I need to have 2 versions: In English and French. I could create two versions of the web site by duplicating all the pages. Is that the...
2
by: attenborough | last post by:
Hi, am hoping that someone may be able to help me. Im designing a small website using PHP and MySQL. I would like to allow my visitors to upload a photo via a form on it. Im worried that people...
0
by: vikram | last post by:
How can we create web setup of web site project in visual studio 2005. I tried but when I say add output, it only shows content files and no project output etc. this is beacuse its a web site and...
2
by: =?Utf-8?B?YWFSaF9tYW5kYQ==?= | last post by:
Hi there, i hope somebody can help me! I am having difficulties uploading photos onto hotmail! I recently bought a new windows vista computer, and when i go to attact files to an email, there is...
1
by: proyectosPSD | last post by:
I WOULD LIKE TO KNOW HOW TO UPLOAD THE SITE I DID TO GOOGLE I DONT LIKE THE TEMPLATES MY SITE IS WWW.MARTIDEBA.COM
1
by: printline | last post by:
Hello all I have a php script that uploads a file from a form into a directory. The directory is automatically created through the script. But the upload file is not put in to the directory,...
11
by: rajatagl | last post by:
Hi I have created my web pages in asp.net I have a registered domain name and space please tell me how to upload my website i my website database is not attached so tell me how first ready my...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.