Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Upload file or use predefined file on server?
Old 03-31-2007, 08:42 AM Upload file or use predefined file on server?
Experienced Talker

Latest Blog Post:
Mandags spil: Gravity Pods
Posts: 33
Name: Lars N
Trades: 0
Hi I have a website where people can upload content using a form.
My problem now is that I want the users to choose if the content is a file or embed file from YouTube etc. When users select YouTube it has to use a predefined file on the server.

So in short terms:

How can I add a radiobutton to my upload form, where the users can sellect Embed and then when they hit submit the form uses a predefined image/file on the server?

- Lars N.
BartAfterDark is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-31-2007, 12:07 PM Re: Upload file or use predefined file on server?
damien_ls's Avatar
Layershift

Posts: 474
Name: Damien
Trades: 0
Quote:
Originally Posted by BartAfterDark View Post
How can I add a radiobutton to my upload form, where the users can sellect Embed and then when they hit submit the form uses a predefined image/file on the server?
You can create a radio buttons in your HTML form like this:
HTML Code:
<input type="radio" name="upload_type" value="embed" />
<input type="radio" name="upload_type" value="upload" />
You may want to refer to http://www.w3schools.com/html/html_forms.asp

You will then need to use some form of server side scripting (e.g. PHP) to process the form, and perform the desired actions (e.g. using your predefined image etc.).
__________________

Please login or register to view this content. Registration is FREE
:: DDS & Dedicated, UK & USA-based
Please login or register to view this content. Registration is FREE
, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)
damien_ls is offline
Reply With Quote
View Public Profile
 
Old 03-31-2007, 01:29 PM Re: Upload file or use predefined file on server?
Experienced Talker

Latest Blog Post:
Mandags spil: Gravity Pods
Posts: 33
Name: Lars N
Trades: 0
Quote:
Originally Posted by damien_ls View Post
You can create a radio buttons in your HTML form like this:
HTML Code:
<input type="radio" name="upload_type" value="embed" />
<input type="radio" name="upload_type" value="upload" />
You may want to refer to http://www.w3schools.com/html/html_forms.asp

You will then need to use some form of server side scripting (e.g. PHP) to process the form, and perform the desired actions (e.g. using your predefined image etc.).
Hmm... yea, I knew about the radio buttons, But it's the "code" for using a predefined file I was looking for :/
BartAfterDark is offline
Reply With Quote
View Public Profile
 
Old 03-31-2007, 01:37 PM Re: Upload file or use predefined file on server?
damien_ls's Avatar
Layershift

Posts: 474
Name: Damien
Trades: 0
Sorry - I don't understand the question properly (apologies if I'm just missing something obvious!).

What exactly do you mean by "the form uses a predefined image/file on the server?"

I.e. where/how is this predefined image/file used.
__________________

Please login or register to view this content. Registration is FREE
:: DDS & Dedicated, UK & USA-based
Please login or register to view this content. Registration is FREE
, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)

Last edited by damien_ls; 03-31-2007 at 01:37 PM.. Reason: add further clarification to the clarification I need :)
damien_ls is offline
Reply With Quote
View Public Profile
 
Old 04-01-2007, 01:51 PM Re: Upload file or use predefined file on server?
Experienced Talker

Latest Blog Post:
Mandags spil: Gravity Pods
Posts: 33
Name: Lars N
Trades: 0
I mean. People sellect if they want to upload a image or if they want to add a embed file. Meaning the the form/script adds a image I have selected
BartAfterDark is offline
Reply With Quote
View Public Profile
 
Old 04-01-2007, 07:55 PM Re: Upload file or use predefined file on server?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
i would know how to implement it but, i would think this could be done possible with something like a php if/else ie
PHP Code:
<php
 
if (($value==embed))
{
embed src="predefinedfileurl";
}
 
elseif ((
$value==upload))
{
file src="urserver/file";
}
 
?> 
Hopefully you get what i mean most of its probally wrong but u know hopefully it helps you (or someone else to help you) do what you after.

Dan

[if works Tp apprieciated ]
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to Upload file or use predefined file on server?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25908 seconds with 12 queries