Jump to content

insert on update


rawky1976

Recommended Posts

Hello

 

I'm using DW to upload a file and insert a record into a mySQL db.

 

My documents table has an extension field for the file extension.

 

I understand the associative array automatically stores this in $HTTP_POST_FILES['fupload']['type']

 

What code would I use in my insert statement: -

 

$insertSQL = sprintf("INSERT INTO document (document_name, document_extension, keywords, about, category, format, submitter) VALUES (%s, %s, %s, %s, %s, %s, %s)",

 

where document_extension is currently: -

 

GetSQLValueString($_POST['documentPath'], "text"),

 

where documentPath is the name of my file upload filed on the form?

 

I know I have to alter this to include some php code but what is the correct syntax?

 

Thanks, Mark

Link to comment
https://forums.phpfreaks.com/topic/40410-insert-on-update/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.