I got a issue with my view, that I can't solve.
My view has 6 forms but when I do the main submit a entire form has null values and a inputText in another form has null too, that's my view:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
<title>Novo Cliente</title>
</h:head>
<h:body>
<ui:composition template="templateAdmin.xhtml">
<ui:define name="conteudoAdmin">
<!-- inicio conteudo de novo cliente -->
<div class="row mt">
<div class="col-lg-12">
<div class="form-panel">
<h4 class="mb"><i class="fa fa-angle-right"></i> Novo Cliente</h4>
<h:form class="form-horizontal style-form" id="tipoCliente">
<th></th>
<h:commandButton class="btn btn-primary" value="Pessoa Física" action="#{clienteController.pessoaFisica()}" />
<p:spacer width="75" height="10" />
<h:commandButton class="btn btn-success" value="Pessoa Jurídica" action="#{clienteController.pessoaJuridica()}" />
<br></br>
<br></br>
<br></br>
</h:form>
<h:form class="form-horizontal style-form" id="buscaCliente" >
<!--inicio condicao CPF CNPJ-->
<div class="form-group">
<h:outputLabel class="col-sm-2 col-sm-2 control-label" value="CPF" for="cpf" rendered="#{clienteController.cliente.tipoPessoa == 0}" />
<h:outputLabel class="col-sm-2 col-sm-2 control-label" value="CNPJ" for="cnpj" rendered="#{clienteController.cliente.tipoPessoa == 1}" />
<div class="col-sm-10">
<p:inputMask mask="999.999.999-99" id="cpf"
value="#{clienteController.cliente.identificacao}"
rendered="#{clienteController.cliente.tipoPessoa == 0}"
/>
<p:inputMask mask=" 99.999.999/9999-99" id="cnpj"
value="#{clienteController.cliente.identificacao}"
rendered="#{clienteController.cliente.tipoPessoa == 1}"
/>
<p:spacer width="55" height="10" />
<h:commandButton id="verifcarCliente" value="Verificar Cliente"
actionListener="#{clienteController.buscaClienteCPFCNPJ()}" >
</h:commandButton>
</div>
</div>
</h:form>
<h:form class="form-horizontal style-form" id="dadosCliente" rendered="#{clienteController.existeCliente == false}" >
<div class="form-group">
<h:outputLabel value="Razão Social" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText value="#{clienteController.cliente.nomeFantasia}" class="form-control" />
</div>
</div>
<div class="form-group">
<h:outputLabel value="Nome" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText value="#{clienteController.cliente.nome}" class="form-control" />
</div>
</div>
<div class="form-group">
<h:outputLabel for="mask" value="Data de Nascimento" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<p:inputMask mask="99/99/9999" id="dataNasc"
value="#{clienteController.dataNascimento}" />
</div>
</div>
<div class="form-group">
<h:outputLabel class="col-sm-2 col-sm-2 control-label" value="Telefone" for="tel" />
<div class="col-sm-10">
<p:inputMask mask="(99)9999-9999" id="tel"
value="#{clienteController.cliente.telefone}"/>
</div>
</div>
<div class="form-group">
<h:outputLabel value="E-mail" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText id="email" value="#{clienteController.cliente.email}" class="form-control" required="true"
pt:placeholder="ex: email#dominio.com"
validatorMessage="Endereço de email inválido.">
<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]#[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
</h:inputText>
<h:message for="email" />
</div>
</div>
<div class="form-group">
<h:outputLabel value="Site" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText id="site" value="#{clienteController.cliente.site}" class="form-control"
validatorMessage="Endereço de site inválido.">
<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_].[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
</h:inputText>
<h:message for="site" />
</div>
</div>
</h:form>
<h:form class="form-horizontal style-form" id="novoClienteCEP" rendered="#{clienteController.existeCliente == false}">
<div class="form-group">
<h:outputLabel class="col-sm-2 col-sm-2 control-label" value="CEP" for="cep" />
<div class="col-sm-10">
<h:inputText id="cep" value="#{clienteController.cep}"
pt:placeholder="Somente Números" maxlength="8" required="true"
validatorMessage="Digite somente os Números">
<f:validateRegex pattern="[0-9]+" />
<f:validateLength minimum="8" maximum="8" />
</h:inputText>
<p:spacer width="55" height="10" />
<h:commandButton id="Buscar_Dados" value="Buscar Dados"
actionListener="#{clienteController.buscarDadosCEP}" >
<f:ajax execute="#form" render="novoClienteCEPDados"/>
</h:commandButton>
</div>
</div>
</h:form>
<!--inicio autopreenchimento de endereço-->
<h:form class="form-horizontal style-form" id="novoClienteCEPDados" rendered="#{clienteController.existeCliente == false}">
<ui:repeat value="#{clienteController.enderecos}" var="dadosEndereco" >
<h:column >
<div class="form-group">
<h:outputLabel value="Logradouro" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText value="#{dadosEndereco.tipoEndereco} #{dadosEndereco.logradouro}"
class="form-control" disabled="true" />
</div>
</div>
<div class="form-group">
<h:outputLabel value="Número" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText value="#{clienteController.numero}" class="form-control" disabled="false"
pt:placeholder="Somente Números" required="true"
validatorMessage="Digite somente os Números">
<f:validateLength minimum="1" />
</h:inputText>
</div>
</div>
<div class="form-group">
<h:outputLabel value="Bairro" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText value="#{dadosEndereco.bairro}" class="form-control" disabled="true" />
</div>
</div>
<div class="form-group">
<h:outputLabel value="Cidade" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText value="#{dadosEndereco.cidade}" class="form-control" disabled="true" />
</div>
</div>
<div class="form-group">
<h:outputLabel value="Estado" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText value="#{dadosEndereco.UF}" class="form-control" disabled="true" />
</div>
</div>
</h:column>
</ui:repeat>
</h:form>
<h:form class="form-horizontal style-form" id="novoClienteSalvar" rendered="#{clienteController.existeCliente == false}">
<!--fim auto preenchimeto endereco-->
<h:commandButton id="Salvar" value="Salvar" action="#{clienteController.salvar}" >
<f:ajax execute="#all" render="#all"/>
</h:commandButton>
<p:spacer width="95" height="10" />
<h:commandButton value="Cancelar" type="reset"/> <p:spacer width="25" height="10" />
</h:form>
</div>
</div>
</div>
<!-- fim conteudo de novo cliente -->
</ui:define>
</ui:composition>
</h:body>
The form dadosCliente and this inputText is null
<div class="form-group">
<h:outputLabel value="Número" class="col-sm-2 col-sm-2 control-label" />
<div class="col-sm-10">
<h:inputText value="#{clienteController.numero}" class="form-control" disabled="false"
pt:placeholder="Somente Números" required="true"
validatorMessage="Digite somente os Números">
<f:validateLength minimum="1" />
</h:inputText>
</div>
</div>
All other forms are correct, if I nest some forms It works, but I read that's not a good thing to do.
Anyone??
Related
We are trying to manage to get a simple contact form running. But regardless of what we try, we get nothing at all.
The form itself is on the front-end and configured like this :
<f:section name="Main">
<div class="ext-frame container">
<h2>{record.header}</h2>
<f:form action="submit" name="order" object="{order}" class="form-horizontal">
<f:for each="{settings.offer}" as="obj" key="id">
<div class="row offer">
<f:if condition="{obj.offer.img}">
<f:then>
<div class="col-sm-4 col-md-4 offer-img-container">
<img src="../{obj.offer.img}" class="offer-image" alt="{obj.offer.img.alternative}" />
</div>
</f:then>
</f:if>
<div class="col-sm-8 col-md-8 {f:if(condition: '{obj.offer.img} == \'\'', then: 'col-sm-offset-4 col-md-offset-4')}">
<label class="offer-label">
<f:form.radio property="offer" value="{id}" />
<div class="pull-right">
<p class="lead">
{obj.offer.title}<br/>
<small>{obj.offer.subtitle}</small>
</p>
<p class="small">{obj.offer.description}</p>
</div>
</label>
</div>
</div>
<hr />
</f:for>
<div class="form-group row">
<label for="salut" class="col-sm-3 control-label">Anrede*</label>
<div class="col-sm-5">
<f:form.select property="salut" options="{herr: 'Herr', frau: 'Frau'}" class="form-control" />
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 control-label">Vorname*</label>
<div class="col-sm-5">
<f:form.textfield property="name" value="" class="form-control" />
</div>
</div>
<div class="form-group row">
<label for="surname" class="col-sm-3 control-label">Nachname*</label>
<div class="col-sm-5">
<f:form.textfield property="surname" value="" class="form-control" />
</div>
</div>
<div class="form-group row">
<div class="col-sm-3 cusnr">
<label for="cusNr" class="control-label">Kundennummer</label>
<span id="helpBlock" class="help-block">(wenn bekannt)</span>
</div>
<div class="col-sm-5">
<f:form.textfield property="cusNr" value="" class="form-control" />
</div>
</div>
<div class="form-group row">
<label for="addr" class="col-sm-3 control-label">Straße/Hausnr.*</label>
<div class="col-sm-5">
<f:form.textfield property="addr" value="" class="form-control" />
</div>
</div>
<div class="form-group row">
<label for="zip" class="col-sm-3 control-label">PLZ*</label>
<div class="col-sm-3">
<div class="input-group">
<span class="input-group-addon">D-</span>
<f:form.textfield property="zip" value="" class="form-control" type="number" maxlength="5" />
</div>
</div>
</div>
<div class="form-group row">
<label for="city" class="col-sm-3 control-label">Ort*</label>
<div class="col-sm-5">
<f:form.textfield property="city" value="" class="form-control" />
</div>
</div>
<div class="form-group row">
<label for="mail" class="col-sm-3 control-label">E-Mail*</label>
<div class="col-sm-5">
<f:form.textfield property="mail" value="" class="form-control" type="email" />
</div>
</div>
<div class="form-group row">
<label for="phone" class="col-sm-3 control-label">Telefon</label>
<div class="col-sm-5">
<f:form.textfield property="phone" value="" class="form-control" type="tel" />
</div>
</div>
<div class="form-group row"><div class="col-sm-offset-3 col-sm-5">
<f:form.select property="know" options="{
0: 'a?*',
1: 'a',
2: 'b',
3: 'c',
4: 'd',
5: 'e',
6: 'f',
7: 'g'
}" class="form-control" />
</div></div>
<div class="form-group row">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<label>
<f:form.checkbox name="term" value="1" />
Ich habe die AGB gelesen und erkläre mich mit
ihnen einverstanden. Ich wurde über mein <a href="widerruf.php" target="_blank">
Widerrufsrecht</a> informiert.
</label>
</div>
</div>
</div>
<div class="form-group row">
<f:form.submit name="submit" value="Send" class="col-xs-12 col-sm-5 col-sm-offset-3 btn" />
</div>
</f:form>
</div>
</f:section>
In our ContentController.php there is also a submitAction given but it seems that this Action is never called :
public function submitAction() {
echo 'Testoutput';exit;
}
Where does the form lead you after submitting? Check out the final HTML action="" if everything is correct.
Try to set the form "method" to POST. I've just had some problems with forms using GET because the target PID got lost for unknown reasons so I had to add a <input type="hidden" name="id" value="{targetPid}" /> to get it working.
I am trying to submit some data in JSF. The problem is that I have two forms and the button which I want to trigger the update is outside of the forms, here I place my code so that you can understand better what I mean. Because of that I cannot submit any data to the server.
<ui:define name="mainArea">
<h:form id="form">
<div class="row">
<div class="col-md-5">
<p:outputLabel for="rfqName" value="Name" />
<br></br>
<p:inputText id="rfqName" required="true" style="width:100%;"
value="#{data.data.rfqName}" maxlength="100">
<p:ajax event="change" update="#form"/>
</p:inputText>
</div>
</div>
<div class="row">
<div class="col-md-3">
<p:outputLabel for="rfqVersion" value="Version" />
<br></br>
<p:inputText id="rfqVersion" required="true" style="width:60%;"
value="#{data.data.rfqVersion}" maxlength="20"></p:inputText>
</div>
</div>
</h:form>
</ui:define>
<ui:define name="actionSection">
<p:commandButton actionListener="#{logic.close}" value="Proceed" update=":form"
styleClass="pull-right">
</p:commandButton>
<p:commandButton value="Save" styleClass="pull-right" />
</ui:define>
You can use the primefaces RemoteCommand. This allows you to click the button on the form from the outside.
<ui:define name="mainArea">
<h:form id="form">
<div class="row">
<div class="col-md-5">
<p:outputLabel for="rfqName" value="Name" />
<br></br>
<p:inputText id="rfqName" required="true" style="width:100%;"
value="#{data.data.rfqName}" maxlength="100">
<p:ajax event="change" update="#form" />
</p:inputText>
</div>
</div>
<div class="row">
<div class="col-md-3">
<p:outputLabel for="rfqVersion" value="Version" />
<br></br>
<p:inputText id="rfqVersion" required="true" style="width:60%;"
value="#{data.data.rfqVersion}" maxlength="20"></p:inputText>
</div>
</div>
<p:remoteCommand name="remoteClose" actionListener="#{logic.close}"
update=":form" styleClass="pull-right" />
<p:remoteCommand name="remoteSave" value="Save"
styleClass="pull-right" />
</h:form>
</ui:define>
<ui:define name="actionSection">
<p:commandButton type="button" onclick="remoteClose()" value="Proceed" />
<p:commandButton type="button" onclick="remoteSave()" value="Save"
styleClass="pull-right" />
</ui:define>
I'm trying to get the 'contact' form on my page in the middle of the webpage.
<form id="contact_form" action="#" method="POST" enctype="multipart/form-data">
<div class="row">
<label for="name">Uw naam:</label><br />
<input id="name" class="input" name="name" type="text" value="" size="30" /><br />
</div>
<div class="row">
<label for="email">Uw e-mail:</label><br />
<input id="email" class="input" name="email" type="text" value="" size="30" /><br />
</div>
<div class="row">
<label for="message">Uw vraag:</label><br />
<textarea id="message" class="input" name="message" rows="7" cols="30"></textarea><br />
</div>
<input id="submit_button" type="submit" value="Verstuur bericht" />
</ul>
</form>
use css:
#contact_form {width:400px;display:block;margin:0 auto;}
contact_form {position:absolute; top:50px;left:10px;width:500px;display:block;margin:0 auto;}
Hi I have two forms on a page, one is a small newsletter sign up form and the other is a larger event booking form. when the large booking form is submitted it submits the small newsletter form aswell. think it has something to do with the action url.
Here is the page code:
<script type="text/javascript"><!--
function validate(f){
var regex = /^\s*$/i;
for(var i=0; i<f.elements.length; i++){
if(regex.test(f.elements[i].value)){
alert("Please fill in all fields.");
f.elements[i].focus();
return false;
}
}
if(f.user_email.value.indexOf('#',0)==-1 || f.user_email.value.indexOf('.',0)==-1)
{
alert("You must provide a VALID email address.");
f.user_email.focus();
return false;
}
return true;
}
//--></script>
<div id="eventform" />
<form action="/Booking?ename=testevent&edate=19%20October%202011&submitform=yes" method="post" onsubmit='return validate(this);'>
<fieldset class="fieldset">
<div class="leftform">
<label for="booking_name">Event: </label><br class="nobr" />
<input name="booking_name" type="text" id="booking_name" value="testevent" />
</div>
<div class="rightform">
<label for="event_date">Date: </label><br class="nobr" />
<input name="event_date" type="text" id="event_date" value="19 October 2011" />
</div>
<div class="clear"></div>
<div class="leftform">
<label for="user_name">Name: </label><br class="nobr" />
<input name="user_name" type="text" id="user_name" />
</div>
<div class="rightform">
<label for="organisation">Organisation: </label><br class="nobr" />
<input name="organisation" type="text" id="organisation" />
</div>
<div class="clear"></div>
<div class="leftform">
<label for="address">Address: </label><br class="nobr" />
<input name="address" type="text" id="address" />
</div>
<div class="rightform">
<label for="postcode">Postcode: </label><br class="nobr" />
<input name="postcode" type="text" id="postcode" />
</div>
<div class="clear"></div>
<div class="leftform">
<label for="user_telephone">Contact Number: </label><br class="nobr" />
<input name="user_telephone" type="text" id="user_telephone" />
</div>
<div class="rightform">
<label for="user_email">Email Contact: </label><br class="nobr" />
<input name="user_email" type="text" id="user_email" />
</div>
<div class="clear"></div>
<br />
<hr />
<h3>Attendees</h3>
<p>Please list the name(s) and email address(s) of those you wish to book a place at the above event.</p>
<div class="leftform">
<input placeholder="Name" name="attendee1" type="text" id="attendee1" />
</div>
<div class="rightform">
<input placeholder="Email Address" name="attendee_email1" type="text" id="attendee_email1" />
</div>
<div class="clear"></div>
<div class="leftform">
<input placeholder="Name" name="attendee2" type="text" id="attendee2" />
</div>
<div class="rightform">
<input placeholder="Email Address" name="attendee_email2" type="text" id="attendee_email2" />
</div>
<div class="clear"></div>
<div class="leftform">
<input placeholder="Name" name="attendee3" type="text" id="attendee3" />
</div>
<div class="rightform">
<input placeholder="Email Address" name="attendee_email3" type="text" id="attendee_email3" />
</div>
<div class="clear"></div>
<div class="leftform">
<input placeholder="Name" name="attendee4" type="text" id="attendee4" />
</div>
<div class="rightform">
<input placeholder="Email Address" name="attendee_email4" type="text" id="attendee_email4" />
</div>
<div class="clear"></div>
<div class="leftform">
<input placeholder="Name" name="attendee5" type="text" id="attendee5" />
</div>
<div class="rightform">
<input placeholder="Email Address" name="attendee_email5" type="text" id="attendee_email5" />
</div>
<div class="clear"></div>
<br />
<hr />
<h3>Invoice Details</h3>
<p>Please give details of where the invoice should be sent.</p>
<label for="invoice_name">Name: </label><br class="nobr" />
<input name="invoice_name" type="text" id="invoice_name" /><br />
<label for="invoice_address">Address: </label><br class="nobr" />
<input name="invoice_address" type="text" id="invoice_address" /><br />
<label for="invoice_postcode">Postcode: </label><br class="nobr" />
<input name="invoice_postcode" type="text" id="invoice_postcode" /><br />
<p>Once we have received your booking form the person booking and those attending will receive a confirmation email confirming your places at the event and an invoice will be issued.
If you have any questions please do not hesitate to contact.</p>
</fieldset>
<br />
<input id="bookingform_submit" class="submitform" type="submit" value="Submit" />
<br /><br />
</form>
</div>
</div>
</div>
<div class="clear"></div>
</div></div>
<!--/content-->
<!--footer-->
<div id="outer-footer">
<div id="footer">
<div class="footer-1">
<h6>Get in touch...</h6>
<ul>
<li>Suite 124-128 Baltic Chambers,50 Wellington Street Glasgow G2 6HJ.</li>
<li><span>Tel:</span> 0141 248 1242</li>
<li><span>Fax:</span> 0141 221 1911</li>
<li><span>Email Us:</span>info#tis.org.uk </li>
</ul>
</div>
<div class="footer-2">
<h6>Join our newsletter...</h6>
<ul>
<li>Hear about the latest event and courses.</li>
<script type="text/javascript"><!--
function validate(f){
var regex = /^\s*$/i;
for(var i=0; i<f.elements.length; i++){
if(regex.test(f.elements[i].value)){
alert("Please fill in all fields.");
f.elements[i].focus();
return false;
}
}
if(f.user_email.value.indexOf('#',0)==-1 || f.user_email.value.indexOf('.',0)==-1)
{
alert("You must provide a VALID email address.");
f.user_email.focus();
return false;
}
return true;
}
//--></script>
<li>
<form action="./&submitform=yes" method="post">
<span class="input_space">
<input name="user_name" id="user_name" type="text" align="left" onblur="if(this.value=='')this.value='Your Name';"
onfocus="if(this.value=='Your Name')this.value='';" value="Your Name" />
</span>
<span>
<input name="user_email" id="user_email" type="text" align="left" onblur="if(this.value=='')this.value='Your Email Address';"
onfocus="if(this.value=='Your Email Address')this.value='';" value="Your Email Address" />
</span>
<input id="newsletterform_submit" type="submit" value="" class="submit-2" />
</form>
I dont think it is submitting the form twice, i think that the variable "submitform" = yes is being set by both, so when you click through to the large form it thinks that form 2 has been submitted also - but in reality it hasn't... you probably want to check that the form has really been submitted using the $_POST variables.
Getting Undefined index: filename error in the below image upload php code. Is there any problem in the below code?
<div id="content">
<form class="wufoo" action=<?php echo (BASE_PATH. 'admin/addbusinessdetail'); ?> method="post">
<input type="hidden" name="maxSize" value="9999999999" />
<input type="hidden" name="maxW" value="200" />
<input type="hidden" name="fullPath" value="<?php echo (BASE_PATH. 'public/img/uploads/'); ?>" />
<input type="hidden" name="relPath" value="<?php echo (BASE_PATH. 'public/img/uploads/'); ?>" />
<input type="hidden" name="colorR" value="255" />
<input type="hidden" name="colorG" value="255" />
<input type="hidden" name="colorB" value="255" />
<input type="hidden" name="maxH" value="300" />
<ul>
<li>
<label class="desc">Business Type</label>
<br />
<div>
<select class="field select" name="ddltype" style="width:300px; height: 30px;">
<?php
$types = $this->_data;
foreach ($types as $value) {
foreach($value as $innvalue){
$businessname[] = $innvalue;
}
echo('<option value="'.$businessname[0].'">'.$businessname[1].'</option>');
unset($businessname);
}
?>
</select>
</div>
</li>
<li>
<label class="desc">Business Detail <span class="req">*</span></label>
<br />
<div>
<input type="text" class="field text" name="businessname" style="width: 300px; height: 20px;" />
</div>
</li>
<li>
<label class="desc">Business Website <span class="req">*</span></label>
<br />
<div>
<input type="text" class="field text" name="website" style="width: 300px; height: 20px;" />
</div>
</li>
<li>
<label class="desc">Business Email <span class="req">*</span></label>
<br />
<div>
<input type="text" class="field text" name="email" style="width: 300px; height: 20px;" />
</div>
</li>
<li>
<label class="desc">Business Image <span class="req">*</span></label>
<br />
<div>
<input type="file" name="filename" />
</div>
</li>
<li>
<label class="desc">Address <span class="req">*</span></label>
<br />
<div>
<textarea name="address" cols="50" rows="8" ></textarea>
</div>
</li>
<li class="buttons">
<input class="submit" type="submit" value="Save" /> <input class="submit" type="button" value="Cancel" onClick="history.back()" />
</li>
</ul>
</form>
addbusinessdetail controller
function addbusinessdetail()
{
print_r($_FILES['filename']);
$this->Admin->addbusinessdetail();
$this->businessdetails(0,0);
}
add this to your form tag:
enctype="multipart/form-data"
If you're doing a file upload, you need this form attribute so the web server knows to expect file data.Here's some more info on file uploads: http://www.tizag.com/phpT/fileupload.php