Hi everyone.
I have a pictures database, where I link to a number that the picture is named.
But I have ex. 15 pictures that are by the same photographer, I have 15 entries in the database where the photographer is the same on all of them and the picture number is from 1 - 15.
This works fine, but it takes a lot of time to insert these 15 entries in PhpMyAdmin since I have to write all the picture info on all the entries.
There for I thought of making an INSERT INTO site, where I write all the info, and how many pics there is, and it will automaticly insert 15 entries with the same picture info.
I have a form like this :
<input type="text" size="4" maxlength="4" name="Num">
<input type="text" size="30" maxlength="30" name="Photographername">
<input type="text" size="50" maxlength="50" name="Addtext">
if($_POST){
$num'= $_POST['Num'];
$photographername'= $_POST['Photographername'];
$addtext'= $_POST['Addtext'];
I then have this INSERT line:
mysql_query ("INSERT INTO Photos (Picturenum, Photographer, Addtext) VALUES ('$num', '$photographername', '$addtext')");
Now I want it to run this insert line 15 times, with $photographername and $addtext being the same and $num raising from 1 to 15.
Is this possible. Maybe with a Foreach command which I'm not so familiar with ??