vincelewin
IS-IT--Management
Can anyone explain why this wont work?
I have a input=file object on the form called pix.
The file uploads but the script below just wont update the record.
$picturequery = "UPDATE adds SET picture={$_FILES['pix']['name']} where accountno=$_POST[record]";
$pictureresult = mysql_query($picturequery) or die ("Couldn't execute the Update picture Query.");
My mysql table field is called picture and the type is varchar(255). The table row already exists and I am just trying to update the record part of the table row.
I also have another form to upload when creating the initial record. This works, sometimes but thats another story. When it creates the whole row it inserts the picture name no problem.
For the record, I did attempt to just use a text field to update the row with a string of text i.e. image.gif. This also failed.
Any help would be greatly appreciated.
I have a input=file object on the form called pix.
The file uploads but the script below just wont update the record.
$picturequery = "UPDATE adds SET picture={$_FILES['pix']['name']} where accountno=$_POST[record]";
$pictureresult = mysql_query($picturequery) or die ("Couldn't execute the Update picture Query.");
My mysql table field is called picture and the type is varchar(255). The table row already exists and I am just trying to update the record part of the table row.
I also have another form to upload when creating the initial record. This works, sometimes but thats another story. When it creates the whole row it inserts the picture name no problem.
For the record, I did attempt to just use a text field to update the row with a string of text i.e. image.gif. This also failed.
Any help would be greatly appreciated.