Hello i use this code to add record into database: <form action="insert-bsongs.php" method="post"> Application Name: <input type="text" name="name" size="60"/> <BR> Details: <input type="text" name="details" size="60"/> <br> song 1: <input type="text" name="song1" size="60"/> <br> URL 1: <input type="text" name="url1" size="60"/> <input type="Submit"/> </form> HTML: <? $db="v2073_test"; $Name=$_POST['name']; $Details =$_POST['details']; $Song1=$_POST['song1']; $Url1=$_POST['url1']; mysql_connect("localhost","USER","PASSWORD") or die(mysql_error()); @mysql_select_db($db) or die( "Unable to select database, Please contact your administrator"); $query = ("INSERT INTO bsongs (`id` , `name` , `details` , `song1` , `url1`)"); mysql_query($query) or die(mysql_error()); mysql_close(); ?> PHP: but now what i want to change html and php code, so that at a time i can add 5 records. plz help
Hello, if you want to save the same information.. You should add in your PHP code a loop best, Jakomo
INSERT INTO myTable (myColumn1, myColumn2) VALUES ('Col 1, Row 1', 'Col 1, Row 2') ('Col 2, Row 1', 'Col 2, Row 2') Code (markup): Like so.