Ok I made the changes you suggested and unfortunately I am getting the same
results... Could not execute query, I manually put entries into the tables
so that the update command would just overwrite the current contents.  Here
is my code this far, I think my problem (correct me if I am wrong) lies in
the fact that each of select boxes does not contain a unique name, needless
to say I am stuck:
$dir_name = "/path/to/images/directory/";
$dir = opendir($dir_name);
$file_list .= "<p><FORM METHOD=\"post\" ACTION=\"index_done.php3\">
<SELECT NAME=\"files\">";
 while ($file_name = readdir($dir)) {
  if (($file_name != ".") && ($file_name !="..")) {
  $file_list .= "<OPTION VALUE=\"$file_name\"
 $file_list .= "</SELECT><br><br><INPUT TYPE=\"submit\" NAME=\"submit\"
Select boxes are filled with files from specified folder... then echoed to
<? echo "$file_list"; ?>
Working fine... when user click on image using said select box it links to
this file, code is as follows:
$db_name = "db_name";
$table_name = "cm_index";
$connection = @mysql_connect("localhost", "user_name", "password") or die
("Could not connect to database.  Please try again later.");
$db = @mysql_select_db("$db_name",$connection) or die ("Could not select
database table. Please try again later.");
$sql = "UPDATE $table_name SET file_name=\"$files\"";
$result = @mysql_query($sql, $connection) or die ("Could not execute query.
Please try again later.");
Still getting could not execute query... sorry about not knowing where I am
going wrong but still new to these advanced functions.  Thanks in advance,

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

Reply via email to