| | |
|
|
|
php/mysql problem - I'm on a deadline Help! |
| message from Pluda on 20 Jul 2004 |
As you can see this a upload function, for 4 files I need to use as
attachements.
The problem is that when print ($dst_file_name); the result is something like:
hugo.txtjaime.txtpresa.swfsomething.fla
but when sending the values to sql, I just get
http://www.mysite/hugo/anexos/something.fla
So, what I need is to split that $dst_file_name into 4 files
Can you please help?
I'm on a dead line to make this work, please be patient, ok?
Thanks!
function moveFileToDestination(){
if(is_uploaded_file($this->tmp_name) && $this->dst_dir){
if($this->checkUploadConditions()){
$dst_file_name = ($this->randon_name) ? $this->generateFileName() :
$this->name;
print ($dst_file_name);
if(@move_uploaded_file($this->tmp_name,$this->dst_dir."/".$dst_file_name)){
@chmod ($this->dst_dir."/".$dst_file_name,$this->file_perm);
$this->error_type = 0;
$endereco = "http://www.mysite.pt/hugo/anexos/";
$connection = mysql_connect("server","user","pass");
mysql_select_db("files");
$sql="UPDATE anexos SET
A='".$endereco."".$dst_file_name."',B='".$endereco."".$dst_file_name."',C='".$en
dereco."".$dst_file_name."',D='".$endereco."".$dst_file_name."'";
$result=mysql_query($sql);
} else {
$this->error_type = 5;
}
} else {
$this->error_type = 6;
|
|
Archived message: php/mysql problem - I'm on a deadline Help! (Macromedia Dreamweaver Web Design)