This topic is locked

problems with copy a record that includes a file

11/12/2007 6:21:59 AM
PHPRunner General questions
J
javier author

first of all, my english is not good, excuse me. well, i have a table 'friends' with a field 'content'. this field contents a file that i set as 'file/image' from 'visual editor' in php runner 3.1. when I edit a record y want to add a copy the record into another table, but when i do it , all values of the fields are correct in the new record but the field 'content' is empty. i do it in 'before record update' and i use this code:

global $conn;

$strSQLInsert = "insert into friends (idfriend, content, ...) values ('$_POST[value_idfriend]', '$_POST[content]', ...)";

db_exec($strSQLInsert,$conn);

i think that the error is in '$_POST[content]'. i try with $_FILES[content][name], values[content], etc. but i have wrong results. somebody can help me, please. thank you.

Alexey admin 11/12/2007

Hi,
please publish your project on Demo Account (last tab in PHPRunner).

Send a link to it to support@xlinesoft.com along with a problem description.