Teen Programmers Unite  
 

 

Return to forum top

Insert an Image

Posted by 142857 [send private reply] at September 06, 2002, 08:45:20 PM

Hi. Does anyone know how to make it so that the viewer of an web page (HTML) can user-friendily browse for and then upload an image to the server? Thank you.

Posted by mop [send private reply] at September 06, 2002, 08:51:40 PM

Like a little textbox and 'browse' button beside it? The form would be a regular HTML form, sending the data to a page that processes it, so you would need to choose that. PHP? ASP? I have instructions somewhere for doing that in PHP

Posted by regretfuldaydreamer [send private reply] at September 06, 2002, 08:53:23 PM

Are you talking just with HTML or with CGI or Servlets.

Posted by 142857 [send private reply] at September 06, 2002, 10:03:29 PM

regretfuldaydreamer: CGI would be better. (servlets are java, right? because i dont know java, but i do know a little about CGI.)

mop: do you know where i can find how to do it in PHP?

thanks, either way is fine

Posted by mop [send private reply] at September 06, 2002, 11:01:15 PM

PHP is great, its free and everything (PHP.net)

I did a google search, and this was the first result, which seems to be exactly what you want: http://www.edevcafe.com/docs/46.html

Posted by gian [send private reply] at September 07, 2002, 02:50:45 AM

It's free, but it's not FREE.

Posted by regretfuldaydreamer [send private reply] at September 07, 2002, 08:52:14 AM

I've been downloading server after free server, patch after patch for the pas two days, and I still haven't mannaged to set one up to support servlets. The Java for them looks pretty easy though. Damn having Windows.

Posted by Psion [send private reply] at September 07, 2002, 01:21:32 PM

Setting up Tomcat under Windows requires almost no work. I think you haven't tried hard enough. =)

Posted by unknown_lamer [send private reply] at September 07, 2002, 02:26:17 PM

PHP is slower than Guile. The PHP developers should now kill themselves. (for those of you who don't know, Guile Scheme is one of the slowest interpreters ever written).

Posted by mop [send private reply] at September 07, 2002, 02:35:36 PM

Its not like your going to notice for simple HTML formatting programs though, and I still wouldn't worry about uploading speed..

Posted by unknown_lamer [send private reply] at September 07, 2002, 02:39:19 PM

What I meant was that the PHP parser is really slow, so it doesn't scale well when your small website becomes popular. Debian Planet used PHP-Nuke, but that started to kill the machine it was running on because PHP is so slow and they had to switch to Drupal instead.

Posted by regretfuldaydreamer [send private reply] at September 07, 2002, 02:52:09 PM

Will try Tomcat now.

Posted by mop [send private reply] at September 07, 2002, 02:58:13 PM

Okay, I see what you mean, a server with PHP would probably burn rapidly after slashdotted. Common accurance.

Posted by gian [send private reply] at September 07, 2002, 05:21:07 PM

I managed to run Tomcat under windows with one hand tied behind my back whilst having thumbscrews applied to the other... it's simple.

Posted by regretfuldaydreamer [send private reply] at September 07, 2002, 06:12:54 PM

Got apache. Getting Tomcat now.
I stayed away from it 'cause I saw it was to do with Apache - and I thought apache was Unix, which it is, but I didn't think I'd find an easy to use port. But if the apache installer was anything to go by then Tomcat will be easy.

Every other server I tried was poorly documented.

Thankss for the suggestion

Posted by unknown_lamer [send private reply] at September 07, 2002, 06:37:19 PM

mop: I wouldn't use PHP for anything that would eventually have high volumes of traffic. PHP is fine for small and medium sized personal and business sites.

Posted by 142857 [send private reply] at September 07, 2002, 07:58:50 PM

mop, thank you for that page--it's just what i needed

i have a windows server with apache. it works fine, considering i get less than 10 hits a day. i want to move to a linux server, though--the neighbors have an old computer they don't want, and i'm gonna install linux on it, put it in the basement, and have it be the server...very exciting.

Posted by mop [send private reply] at September 07, 2002, 08:32:28 PM

That would also be a good opperatunity to experiment with a freeBSD server.

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.