Re: Wow, this is weird

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David,

Try using $_FILES['image']['name'] (like you do elsewhere in the script) instead of $_POST['image'] ?

Also, if you're not just doing a simple test script, you should probably use mysql_real_escape_string() on your parameters in the query.

You may want to also look at the alternative mysql drivers, as the API you're using is planned for deprecation at some point.
http://php.net/manual/en/mysql.php
http://www.php.net/manual/en/mysqlinfo.api.choosing.php (this page seems to leave out the mysqlnd driver)

-Matt

On 08/27/2012 03:04 PM, David McGlone wrote:
Hi Everyone

I have written some code that works almost 100% like I expect, but for the
life of me I cannot figure out why the image name is not being inserted into
the database. I've posted the code on pastebin, can anyone spot something
amis?

http://pastebin.com/mGBFrxwP

David M.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux