bob_the _builder Posted March 14, 2007 Share Posted March 14, 2007 Hi, I have a form layed out like so to upload photos and input the file name into the database. while($counter <= $nof){ echo '<div class="editpage"> <label>Photo '.($counter+1).' Title</label> <input type="text" name="photo1alt[]" value="'.$myrow["photo1alt"].'" size="50" /><p /> <label>Change Photo '.($counter+1).'</label> <input type="file" name="photo_filename[]" size="37" /> </div><p />'; $counter++; } Im not to sure how to break that up to insert into the database like so .. $sql = mysql_query("UPDATE mypage SET photo1alt = '$photo1alt', photo1 = '$photo1', photo2alt = '$photo2alt', photo2 = '$photo2', photo3alt = '$photo3alt', photo3 = '$photo3', photo4alt = '$photo4alt', photo4 = '$photo4', photo5alt = '$photo5alt', photo5 = '$photo5' WHERE userid='$userid'"); ? Thanks Quote Link to comment Share on other sites More sharing options...
ridiculous Posted March 14, 2007 Share Posted March 14, 2007 God that's a really good question Bob. I don't have the answer, but what I will say is that I'm listening to Foreigner right now and their song "Urgent" rocks. So hard. Quote Link to comment Share on other sites More sharing options...
bob_the _builder Posted March 14, 2007 Author Share Posted March 14, 2007 Im guessin I can use explode function, but im not sure what the delimiter would be with such an array.. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.