i have 5 rows and i want to store all row data into database but it is storing only last row data instead of all four

Recommended Answers

All 2 Replies

would be nice if you'd show us some code....

Like Adrian said.. We need to see code. How are we suppose to know what you are talking about or having problems with. Read the Posting rules.

As for your question, try using a loop.

Example:

$rows = array($row1, $row2, $row3, $row4);

foreach($rows as $row){
 //insert new row to database.
}

This code is just to get you thinking not a solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.