Please help me figure it out. I make photo albums. Albums are created normally. Then you have to choose an album from select, choose a photo and upload. So, the problem is that when choosing any album, the photos are loaded into one. There is a table in the albom , it contains the id_albom ( auto_increment ) fields, id (it is assigned the user id ), albom (the album name is entered there when you create it) and id_albom1 (the album name is also id_albom1 there when you create it, I don’t need it). And there is a table of photos, the fields in it: id_photo ( auto_increment ), id (it is assigned the user id ), photo ( photo name) and albom (the album that you select from select , but the same one is inserted). But the request itself in the file handler:

 $q1 = mysql_query("select * from albom where id='$myrow2[id]'"); $q2 = mysql_fetch_array($q1); $result31 = mysql_query("INSERT INTO photos (id,photo,albom) VALUES ('$myrow2[id]','$filename','$q2[albom]')",$db);` 

you need to somehow indicate that the photo is loaded into the selected album, but I don’t understand how.

    1 answer 1

    the problem is that you don’t get this

      $q2[albom] 

    Try in the form to add pictures to add a hidden field for this.

    • Alternatively still albom quotes to conclude. - culebre