Created
April 26, 2016 15:59
-
-
Save MahbbRah/79d3c478bf61f4511671f72ca7a654d1 to your computer and use it in GitHub Desktop.
As you can see this is a working query. and now I want to add first and second field (int) value on 3rd field like $f_name + $m_name = value; with loop. how could i do that?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST['Submit'])){ | |
for($i=0;$i<$count;$i++){ | |
$name = $_POST['name']; | |
$f_name = $_POST['lastname']; | |
$m_name = $_POST['email']; | |
// This is a query for uploading multiple values in single query. | |
$sql1="UPDATE computer SET s_name='$name[$i]', f_name='$f_name[$i]', m_name='$m_name[$i]' WHERE roll='$id[$i]'"; | |
$result1=$db->dbc->query($sql1); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment