| | |
Insert only selected result records in database
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2008
Posts: 33
Reputation:
Solved Threads: 0
Hi all,
I am getting result in an array from some webservice and i have created User Interface to see these results with each result have a check box with it.
what i want to do is to insert only that record in DB that user will check in check box.
Is there any way to do that.
User will check the check box against the record they want to insert in db and hit submit button.so all those records will go in db.there are four fields in Db table.
Thanks in advance.
jyotiu
I am getting result in an array from some webservice and i have created User Interface to see these results with each result have a check box with it.
what i want to do is to insert only that record in DB that user will check in check box.
Is there any way to do that.
PHP Syntax (Toggle Plain Text)
<tr> <td align='center'><input type='checkbox' name='chk0' value=''/></td> <td align='center'>1</td> <td align='center'>Dell Home_GenericLogo 88x31 </td> <td align='center'>4</td> <td align='center'>100</td></tr> <tr> <td align='center'><input type='checkbox' name='chk1' value=''/></td> <td align='center'>66</td> <td align='center'>Dell Home_GenericLogo 88x31 </td> <td align='center'>66</td> <td align='center'>40</td></tr> <tr> <td align='center'><input type='checkbox' name='chk2' value=''/></td> <td align='center'>99</td> <td align='center'>Dell Home_GenericLogo 88x31 </td> <td align='center'>19</td> <td align='center'>167</td></tr> <tr> <td align='center'><input type='checkbox' name='chk3' value=''/></td> <td align='center'>6</td> <td align='center'>Dell Home_GenericLogo 88x31 </td> <td align='center'>44</td> <td align='center'>555</td></tr>
User will check the check box against the record they want to insert in db and hit submit button.so all those records will go in db.there are four fields in Db table.
Thanks in advance.
jyotiu
Last edited by jyotiu; Apr 8th, 2009 at 10:41 am.
•
•
Join Date: Jan 2007
Posts: 164
Reputation:
Solved Threads: 10
•
•
•
•
Hi all,
I am getting result in an array from some webservice and i have created User Interface to see these results with each result have a check box with it.
what i want to do is to insert only that record in DB that user will check in check box.
Is there any way to do that.
PHP Syntax (Toggle Plain Text)
<tr> <td align='center'><input type='checkbox' name='chk0' value=''/></td> <td align='center'>1</td> <td align='center'>Dell Home_GenericLogo 88x31 </td> <td align='center'>4</td> <td align='center'>100</td></tr> <tr> <td align='center'><input type='checkbox' name='chk1' value=''/></td> <td align='center'>66</td> <td align='center'>Dell Home_GenericLogo 88x31 </td> <td align='center'>66</td> <td align='center'>40</td></tr> <tr> <td align='center'><input type='checkbox' name='chk2' value=''/></td> <td align='center'>99</td> <td align='center'>Dell Home_GenericLogo 88x31 </td> <td align='center'>19</td> <td align='center'>167</td></tr> <tr> <td align='center'><input type='checkbox' name='chk3' value=''/></td> <td align='center'>6</td> <td align='center'>Dell Home_GenericLogo 88x31 </td> <td align='center'>44</td> <td align='center'>555</td></tr>
User will check the check box against the record they want to insert in db and hit submit button.so all those records will go in db.there are four fields in Db table.
Thanks in advance.
jyotiu
PHP Syntax (Toggle Plain Text)
change your name='chk0' into an array name=chk[] call all the values from this code. $chk=$_POST['chk']; while (list ($key,$val) = @each ($chk)) { echo "$val,"; } you can manipulate your values for every checkbox.
![]() |
Similar Threads
- php script for dropdown to fetch DB list and then Tables (PHP)
- Allowing multiple adds to SQL database (PHP)
- problem with text box....... (C#)
- inserting checkbox values in mysql +PHP (PHP)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- Cannot get MySQL to talk to .php file (MySQL)
- Store multiple selection from pagination info into single array (PHP)
- Help (again) on a modify record script (PHP)
Other Threads in the PHP Forum
- Previous Thread: Confirmation dialog box for delete
- Next Thread: PHP and Sql question
| Thread Tools | Search this Thread |
apache api array beginner beneath binary broadband broken button cakephp checkbox class cms code countingeverycharactersfromastring crack cron curl database date decode display dynamic echo email error fcc file files folder form forms freelancing function functions google href htaccess html image include incode insert integration ip javascript joomla limit link login mail match menu method mlm mod_rewrite multiple mysql oop pageing pagerank paypal pdf php problem protocol query radio random recursion recursiveloop remote script search server sessions sms smtp soap source space sql strip_tags support! survey syntax system table template tutorial update upload url validator variable video virus web window.onbeforeunload=closeme; youtube





