It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

xhtml project

xhtml project

Postby siten0308 on Thu Dec 04, 2008 5:52 pm

Hello,

I am coming back after a long time without doing xhtml, but i have a question, I want one page to pretty much be a page where the user browses for the jpg file or bmp file and uploads it with the text box information they have below, i have 3 text boxes which will have their name, last name and description, after they click submit, i want it to be able get the image, with the text box information and post it on another web page, stupid question but, can this be done in xhtml? if so, i got the page already done with the 3 text boxes and the browse button to find jpg and bmp, but the rest such as getting that info and posting it on another webpage is a different story, how would I accomplish that?

Also, on the browse feature, how do i tell it to find only jpg and bmp and not other file extensions?


thanks again
siten0308
 
Posts: 0
Joined: Thu Dec 04, 2008 5:48 pm

Re: xhtml project

Postby rangana on Fri Dec 05, 2008 1:26 am

This couldn't be done by XHTML alone.

You need server-side scripting to process the data being uploaded on the server.

Useful links:
http://www.tizag.com/phpT/fileupload.php
http://us.php.net/features.file-upload

You can restrict the uploaded file only when they are .jpg/.bmp two ways:
1. Client-side (Look for the extension, if it's not .jpg/.bmp then don't let it submit)
2. Server-side (For PHP, you can get the file type. YOu can write an if statement telling to accept only file with "jpeg/jpg or image/bmp" extensions).

Hope that helps.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: xhtml project

Postby xingles on Tue Jan 27, 2009 5:35 pm

javascrip need upload to your service.
xingles
 
Posts: 2
Joined: Tue Jan 27, 2009 5:25 pm
Location: HongKong


Who is online

Users browsing this forum: No registered users and 4 guests