Subject Re: R: Re: [firebird-php] Re: File upload
Author .Christophe DERENNE
Hello, this is just a upload file problem.
You could search for upload file example in php.net Or, try something like
this :

The form :

<form enctype=*'multipart/form-data'* method='post'
action='yourscript.php?action=youraction'>
<input type=hidden name='thepk' value='$this->thepk'>
<table><tr valign=top><td valign=top>
<input type='*file*' name='*userfile*' size='35'></td>
<td><input type=submit name='button' value='Modify' ></td></tr></table>
</form></fieldset>

When loading the page :

$this->button=$_POST["button"];
*
$this->photo=(isset($_FILES["userfile"])?$_FILES["userfile"],"tmp_name":"");
*
$this->thepk=$_POST["thepk"];

if ($this->button=="Modify")
{
$this->Donnees->UpdatePhoto($this->pk,$this->photo);
}



Rgds

Christophe


2011/8/21 Sakhile Njoko <sakhinjoko@...>

> **
>
>
> Problem solved. Thanx for trying to help.
>
>
> --- On Sun, 21/8/11, u.masotti@... <u.masotti@...> wrote:
>
> From: u.masotti@... <u.masotti@...>
> Subject: R: Re: [firebird-php] Re: File upload
> To: firebird-php@yahoogroups.com
> Date: Sunday, 21 August, 2011, 16:53
>
>
>
> Hi Sakhi,
>
> ----Messaggio originale----
> Da: sakhinjoko@...
> Ogg: Re: [firebird-php] Re: File upload
>
> I have just one challenge now. The file import only works if the file is
> in the same folder as the PHP script. How can I make it work regardless of
> file
> location?
>
> Maybe that web user under which web server runs, has no write permission
> into
> directories where you are trying to save files.
>
> Ciao.
> Mimmo.
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]