right now I have it setup as a hardcoded file... here is the piece of code:
$dir_name = "/path/to/images/directory/";
$dir = opendir($dir_name);
$file_list .= "<p><FORM METHOD=\"post\" ACTION=\"index_done.php3\"
NAME=\"$file_name\"><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\"
And this is what I am storing in the database...
Structure of table:
CREATE TABLE image_paths (
   id_index int(11) DEFAULT '0' NOT NULL,
   wel_area blob,
   ad01 blob NOT NULL,
   ad02 blob NOT NULL,
   ad03 blob NOT NULL,
   ad04 blob NOT NULL,
   ad05 blob NOT NULL,
   ad06 blob NOT NULL,
   ad01_t blob NOT NULL,
   ad02_t blob NOT NULL,
   ad03_t blob NOT NULL,
   ad04_t blob NOT NULL,
   ad05_t blob NOT NULL,
   ad06_t blob NOT NULL,
   PRIMARY KEY (id_index),
   KEY id_index (id_index)
Contents of table:
INSERT INTO image_paths VALUES ( '0', '<td colspan=\"2\" class=\"content\">a
lot of text goes here for the main page</td>',
'http://localhost/full_ad/willies_040402.jpg', 'blank', 'blank', 'blank',
'blank', 'blank', 'http://localhost/full_ad/willie_logo.jpg', 'blank',
'blank', 'blank', 'blank', 'blank');

Now I sincerely hope this helps because I am at a complete loss on how to
create either a unique field name or a unique action for the form in
question.  You see I have a page which displays the current contents of the
image_paths table, and what I need to do from there is have my form (top
piece of code) to be echoed to the screen in 12 places because there are 12
fields in my table that I need to give the user an option to select which
image they wish to be placed on the main page, ad01 = big image
ad01_t = thumbnail image
by creating a unique form name or unique action for my form I will be able
to either 1- pass the contents of users selection to another script that
enters the path and file name into the correct table field by use of the
form name or 2- pass the contents of the users selection to another script
(that again would put the image name and path into the appropriate field in
table) based on the unique action file name.  I know why it doesn't work and
that would be because upon the creation of the form the $file_name variable
reads the directory and places the results into the select boxes AFTER the
form is made.  Now being able to fix this is well beyond my scope.  I hope
this clears it up for everyone. =)
Thanks in advance,

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

Reply via email to