By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,385 Members | 1,932 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,385 IT Pros & Developers. It's quick & easy.

here i want to transfer multiple textbox box in a mysql database using php coding...

P: 1
$connection=mysql_connect("localhost","root") or die( mysql_error() );

mysql_select_db("studentmgmt",$connection )or die( mysql_error());

$res=mysql_query("select * from studentmgmt.add where deptt='I.T'");
echo"<table align='center' border='1'>";
echo"<form method='post' action=''>";
echo"<th>Name</th><th>Roll no</th><th>Attendence</th>";
echo"<tr><td>$row[name]</td><td>$row[rollno]</td><td><input type='text' name='at[]'></td></tr>";
echo"<tr><td><input type='submit' name='submit'></td></tr>";

mysql_query("insert into studentmgmt.attendenceit(name,rollno) select name,rollno from studentmgmt.add where deptt='I.T'")or die(mysql_error());
mysql_query("insert into studentmgmt.attendenceit(attendence) values('$attendence[]'") or die(mysql_error());
$res=mysql_query("select * from studentmgmt.attendenceit");

mysql_query("update studentmgmt.attendenceit set attendence='$attendence[$i]'")
or die(mysql_error());

Nov 28 '11 #1
Share this Question
Share on Google+
1 Reply

P: 638
Hi ,
please use [code] tags to wrap your code inside , and whats the problem with the above code, what errors are you facing any detail,you must provide sufficent detail while asking a question and please read the Please Read Before Posting - Forum Etiquette & Useful Stuff once before posting a question.
Omer Aslam
Nov 28 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.