RE: [PHP-DB] storing images in database

2005-01-26 Thread Gareth Heyes
if(isset($_GET['id'])) { $id=$_GET['id']; $query = select bin_data, filetype from binary_data where id=$id; This is a really bad example, anybody can inject your query with malicious sql commands. Never trust user supplied data. -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] Re: Newbie Setup Trouble

2005-02-07 Thread Gareth Heyes
The code appears to be correct. But it sounds like a problem with the php/mysql integration. Try reinstalling PHP with the correct mysql libraries. In phpinfo check that mysql support is enabled. If you are not technical and would just like to learn the PHP language not how to configure it etc.

[PHP-DB] Re: Notice: Undefined index: op

2005-02-22 Thread Gareth Heyes
Notices have been turned on your PHP installation. This means you will need to declare all of your variables otherwise you will receive a notice. To fix your problem simply declare your POST variable before use. if(isset($_POST['op'])) { $op = $_POST['op']; } else { $op = ; }