开发者

move_uploaded_file not working properly

i would like to ask if someone knows what went wrong with my program.

you see, after i upload 开发者_如何学运维a file, the uploaded file is moved to the created folder document, the the other information like, uploadname and employee id that is supposed to be inserted in the database did not insert it. the file was copied to the document but info did not insert. i hope someone could help me. no errors where found in my code *CASE CLOSED, but thanks for the help


First: You have only written insert query, you don't actually call mysql_query($insert_query);

Second: Are you sure all those inputs are valid? Try putting $company_id in single quotes too.

Also is there any error or warning message showing up?

NOTE: Remember to escape and validate your input! Look through this page: http://php.net/manual/en/security.database.sql-injection.php


You should add the following line at the end of the code.

mysql_query ($insert_query, $conn) or die (mysql_error());

It will try to insert the record otherwise will show the error in the page, so you can debug to identify the issue and fix easily.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜