Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns 'category',
'comment' and share (the category column also holds the index no of the
record in a hidden field)
I wish the user to be able to edit the data in the table, so I have
extracted the records into hiddenfield, textareas, dropdown list and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to take each row in
turn (and any changes made) and update the mysql table. I did something
similar with just one record but am stuck as to how I use the arrays of a
number of form elements together
My code for the table is below but I dont know how the script should go when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
*************** *************** *************** *************** **********
<form action="comment select.php" method="post" enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo $row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE username =
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID']; ?>"><?php echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php echo $commindex;
?>"></td>
<td width="60%" align="left" class="bodytext " <textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo $comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?> </td>
</tr>
<?php
}
?>
</table>
</form>
*************** *************** *************** *************** 16 3464
If I understand you correctly, the way I would do it is the same way I have
my DVD database. This is rather than have the name of the elements as
"commindex[]" etc, actually place the table creation inside your while loop
and increment the naming field using the i variable you use, ie:
"commindex[<?=$i?>]".
As an example of what I mean, here is an excerpt of my DVD database code
which you can view at "http:// mydvds . psiss . com"
------------------------------------------------------
if($allRecords 0)
{
$recordCount = 0;
while($recordCo unt < $allRecords)
{
if(($recordCoun t / 2) % 2 == 1)
{
?>
<tr align="center" class="tr_even" >
<?
}
else
{
?>
<tr align="center" class="tr_odd">
<?
}
for($colCount = 0; $colCount < 2 && $recordCount < $allRecords;
$colCount++)
{
$dataArray = mysql_fetch_arr ay($result);
$dataArray['starring'] = str_replace("\r ","<BR>",$dataA rray['starring']);
$dataArray['synopsis'] = str_replace("\r ","<BR>",$dataA rray['synopsis']);
$dataArray['duration'] = date('H:i',strt otime($dataArra y['duration']));
?>
<td background="ima ges/barSilver.jpg" width="30"><?=( $recordCount +
1)?></td>
<td width="4">  ;</td>
<td>
<div class="div_info " style="position : absolute; width: 400px;
z-index: 1; visibility: hidden;" id="infoLayer_< ?=$recordCount? >"
align="left"><b ><u><?=$dataArr ay['title']?></u></b><p><u>Starrin g:</u><br><i><?=$da taArray['starring']?></i></p><p><?=$dataAr ray['synopsis']?></p></div>
<?
if($dataArray['dvd_image'] == "None")
{
?>
<img id="img_<?=$rec ordCount?>" width="50" height="70"
src="images/dvds/none_small.jpg"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >',img_<?=$reco rdCount?>.width
+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
<?
}
else
{
?>
<img id="img_<?=$rec ordCount?>" width="50" height="70"
src="images/dvds/<?=$dataArray['dvd_image']?>"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >',img_<?=$reco rdCount?>.width
+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
<?
}
echo " <img
src='images/certs/".$certImag e[$dataArray['certificate']].".gif'><BR>".$ dataArray['title'];
?>
</td>
<td width="4">  ;</td>
<td><b>Released </b><br><?=$dataA rray['year']?><br>
<b>Duration</b><br><?=$dataA rray['duration']?><br>
<b>Rating</b><br><img alt="Rating: <?=$dataArray['rating']/2?>"
align="absmiddl e"
src="images/ratings/pips<?=$dataArr ay['rating']?>.gif"></td>
<td width="4">  ;</td>
<?
$recordCount++;
}
?>
</tr>
<?
}
}
----------------------------------
"Ian Davies" <ia********@vir gin.netwrote in message
news:j3******** *******@newsfe3-win.ntli.net...
Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns 'category',
'comment' and share (the category column also holds the index no of the
record in a hidden field)
I wish the user to be able to edit the data in the table, so I have
extracted the records into hiddenfield, textareas, dropdown list and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to take each row
in
turn (and any changes made) and update the mysql table. I did something
similar with just one record but am stuck as to how I use the arrays of a
number of form elements together
My code for the table is below but I dont know how the script should go
when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
*************** *************** *************** *************** **********
<form action="comment select.php" method="post"
enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo $row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE username =
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID']; ?>"><?php echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php echo $commindex;
?>"></td>
<td width="60%" align="left" class="bodytext " <textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo $comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input
type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?> </td>
</tr>
<?php
}
?>
</table>
</form>
*************** *************** *************** ***************
Thanks for the reply
The problem Im having isnt creating a table with the records in it. That
works fine. Im trying to find a way where the users can modify the records
in a table and they are all updated in one go. I thought using arrays would
be the answer, but Im not that familiar with them. At the moment the users
click a button at the begining of a row and that record is displated on a
new page where it can be updated. But this requires the user to click and
update one record at a time. Whereas I wish them to make all the changes to
all the records they want in the table and then on clicking a button some
script would take each row in turn and update that row in te database, it
would then loop through all the rows in the table and update each
accordingly
Hope this explains it better
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:uF******** **********@news fe6-gui.ntli.net...
If I understand you correctly, the way I would do it is the same way I
have
my DVD database. This is rather than have the name of the elements as
"commindex[]" etc, actually place the table creation inside your while
loop
and increment the naming field using the i variable you use, ie:
"commindex[<?=$i?>]".
As an example of what I mean, here is an excerpt of my DVD database code
which you can view at "http:// mydvds . psiss . com"
------------------------------------------------------
if($allRecords 0)
{
$recordCount = 0;
while($recordCo unt < $allRecords)
{
if(($recordCoun t / 2) % 2 == 1)
{
?>
<tr align="center" class="tr_even" >
<?
}
else
{
?>
<tr align="center" class="tr_odd">
<?
}
for($colCount = 0; $colCount < 2 && $recordCount < $allRecords;
$colCount++)
{
$dataArray = mysql_fetch_arr ay($result);
$dataArray['starring'] =
str_replace("\r ","<BR>",$dataA rray['starring']);
$dataArray['synopsis'] =
str_replace("\r ","<BR>",$dataA rray['synopsis']);
$dataArray['duration'] = date('H:i',strt otime($dataArra y['duration']));
?>
<td background="ima ges/barSilver.jpg" width="30"><?=( $recordCount +
1)?></td>
<td width="4">  ;</td>
<td>
<div class="div_info " style="position : absolute; width: 400px;
z-index: 1; visibility: hidden;" id="infoLayer_< ?=$recordCount? >"
align="left"><b ><u><?=$dataArr ay['title']?></u></b><p><u>Starrin g:</u><br><i
><?=$dataArra y['starring']?></i></p><p><?=$dataAr ray['synopsis']?></p></div>
<?
if($dataArray['dvd_image'] == "None")
{
?>
<img id="img_<?=$rec ordCount?>" width="50" height="70"
src="images/dvds/none_small.jpg"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
<?
}
else
{
?>
<img id="img_<?=$rec ordCount?>" width="50" height="70"
src="images/dvds/<?=$dataArray['dvd_image']?>"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
<?
}
echo " <img
src='images/certs/".$certImag e[$dataArray['certificate']].".gif'><BR>".$ data
Array['title'];
?>
</td>
<td width="4">  ;</td>
<td><b>Released </b><br><?=$dataA rray['year']?><br>
<b>Duration</b><br><?=$dataA rray['duration']?><br>
<b>Rating</b><br><img alt="Rating: <?=$dataArray['rating']/2?>"
align="absmiddl e"
src="images/ratings/pips<?=$dataArr ay['rating']?>.gif"></td>
<td width="4">  ;</td>
<?
$recordCount++;
}
?>
</tr>
<?
}
}
----------------------------------
"Ian Davies" <ia********@vir gin.netwrote in message
news:j3******** *******@newsfe3-win.ntli.net...
Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns 'category',
'comment' and share (the category column also holds the index no of the
record in a hidden field)
I wish the user to be able to edit the data in the table, so I have
extracted the records into hiddenfield, textareas, dropdown list and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to take each row
in
turn (and any changes made) and update the mysql table. I did something
similar with just one record but am stuck as to how I use the arrays of
a
number of form elements together
My code for the table is below but I dont know how the script should go
when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
*************** *************** *************** *************** **********
<form action="comment select.php" method="post"
enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo
$row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE username =
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID']; ?>"><?php echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php echo
$commindex;
?>"></td>
<td width="60%" align="left" class="bodytext " <textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo $comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input
type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?> </td>
</tr>
<?php
}
?>
</table>
</form>
*************** *************** *************** ***************
Yes, that explains it much better. Which field is it you are trying to
amend? Is it a simple yes/no type field? If so then you need to adjust
your query accordingly. I don't have time right now to explain fully but if
you send me a personal email to orion at psiss dot com I will try and
explain how I would approach it.
Regards
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message
news:Bw******** **********@news fe1-win.ntli.net...
Thanks for the reply
The problem Im having isnt creating a table with the records in it. That
works fine. Im trying to find a way where the users can modify the records
in a table and they are all updated in one go. I thought using arrays
would
be the answer, but Im not that familiar with them. At the moment the users
click a button at the begining of a row and that record is displated on a
new page where it can be updated. But this requires the user to click and
update one record at a time. Whereas I wish them to make all the changes
to
all the records they want in the table and then on clicking a button some
script would take each row in turn and update that row in te database, it
would then loop through all the rows in the table and update each
accordingly
Hope this explains it better
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:uF******** **********@news fe6-gui.ntli.net...
>If I understand you correctly, the way I would do it is the same way I
have
>my DVD database. This is rather than have the name of the elements as "commindex[]" etc, actually place the table creation inside your while
loop
>and increment the naming field using the i variable you use, ie: "commindex[<?=$i?>]".
As an example of what I mean, here is an excerpt of my DVD database code which you can view at "http:// mydvds . psiss . com"
------------------------------------------------------ if($allRecor ds 0) { $recordCount = 0; while($recordCo unt < $allRecords) { if(($recordCoun t / 2) % 2 == 1) { ?> <tr align="center" class="tr_even" > <? } else { ?> <tr align="center" class="tr_odd"> <? } for($colCount = 0; $colCount < 2 && $recordCount < $allRecords; $colCount++) { $dataArray = mysql_fetch_arr ay($result); $dataArray['starring'] =
str_replace("\r ","<BR>",$dataA rray['starring']);
> $dataArray['synopsis'] =
str_replace("\r ","<BR>",$dataA rray['synopsis']);
> $dataArray['duration'] = date('H:i',str totime($dataArr ay['duration'])); ?> <td background="ima ges/barSilver.jpg" width="30"><?=( $recordCount + 1)?></td> <td width="4">  ;</td> <td> <div class="div_info " style="position : absolute; width: 400px; z-index: 1; visibility: hidden;" id="infoLayer_< ?=$recordCount? >"
align="left"><b ><u><?=$dataArr ay['title']?></u></b><p><u>Starrin g:</u><br><i
>><?=$dataArr ay['starring']?></i></p><p><?=$dataAr ray['synopsis']?></p></div> <? if($dataArray['dvd_image'] == "None") { ?> <img id="img_<?=$rec ordCount?>" width="50" height="70" src="images/dvds/none_small.jpg"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
>+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')"> <? } else { ?> <img id="img_<?=$rec ordCount?>" width="50" height="70" src="images/dvds/<?=$dataArray['dvd_image']?>"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
>+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')"> <? } echo " <img
src='images/certs/".$certImag e[$dataArray['certificate']].".gif'><BR>".$ data
Array['title'];
>?> </td> <td width="4">  ;</td> <td><b>Released </b><br><?=$dataA rray['year']?><br> <b>Duration</b><br><?=$dataA rray['duration']?><br> <b>Rating</b><br><img alt="Rating: <?=$dataArray['rating']/2?>" align="absmidd le" src="images/ratings/pips<?=$dataArr ay['rating']?>.gif"></td> <td width="4">  ;</td> <? $recordCount++; } ?> </tr> <? } } ----------------------------------
"Ian Davies" <ia********@vir gin.netwrote in message news:j3******* ********@newsfe 3-win.ntli.net...
Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns 'category',
'comment' and share (the category column also holds the index no of the
record in a hidden field)
I wish the user to be able to edit the data in the table, so I have
extracted the records into hiddenfield, textareas, dropdown list and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to take each
row
in
turn (and any changes made) and update the mysql table. I did something
similar with just one record but am stuck as to how I use the arrays of
a
number of form elements together
My code for the table is below but I dont know how the script should go
when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
*************** *************** *************** *************** **********
<form action="comment select.php" method="post"
enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo
$row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE username =
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID']; ?>"><?php
echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php echo
$commindex;
?>"></td>
<td width="60%" align="left" class="bodytext " <textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo $comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input
type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?> </td>
</tr>
<?php
}
?>
</table>
</form>
*************** *************** *************** ***************
Hi
I am trying to amend three fields all one text and two integer
In my original code you will see what I mean
The values for the text field would come from a textarea in one column of
the table and the values for the two integer fields would come from a
dropdown list and a tick box which are in the other columns.
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:MQ******** *******@newsfe3-win.ntli.net...
Yes, that explains it much better. Which field is it you are trying to
amend? Is it a simple yes/no type field? If so then you need to adjust
your query accordingly. I don't have time right now to explain fully but
if
you send me a personal email to orion at psiss dot com I will try and
explain how I would approach it.
Regards
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message
news:Bw******** **********@news fe1-win.ntli.net...
Thanks for the reply
The problem Im having isnt creating a table with the records in it. That
works fine. Im trying to find a way where the users can modify the
records
in a table and they are all updated in one go. I thought using arrays
would
be the answer, but Im not that familiar with them. At the moment the
users
click a button at the begining of a row and that record is displated on
a
new page where it can be updated. But this requires the user to click
and
update one record at a time. Whereas I wish them to make all the changes
to
all the records they want in the table and then on clicking a button
some
script would take each row in turn and update that row in te database,
it
would then loop through all the rows in the table and update each
accordingly
Hope this explains it better
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:uF******** **********@news fe6-gui.ntli.net...
If I understand you correctly, the way I would do it is the same way I
have
my DVD database. This is rather than have the name of the elements as
"commindex[]" etc, actually place the table creation inside your while
loop
and increment the naming field using the i variable you use, ie:
"commindex[<?=$i?>]".
As an example of what I mean, here is an excerpt of my DVD database
code
which you can view at "http:// mydvds . psiss . com"
------------------------------------------------------
if($allRecords 0)
{
$recordCount = 0;
while($recordCo unt < $allRecords)
{
if(($recordCoun t / 2) % 2 == 1)
{
?>
<tr align="center" class="tr_even" >
<?
}
else
{
?>
<tr align="center" class="tr_odd">
<?
}
for($colCount = 0; $colCount < 2 && $recordCount < $allRecords;
$colCount++)
{
$dataArray = mysql_fetch_arr ay($result);
$dataArray['starring'] =
str_replace("\r ","<BR>",$dataA rray['starring']);
$dataArray['synopsis'] =
str_replace("\r ","<BR>",$dataA rray['synopsis']);
$dataArray['duration'] =
date('H:i',strt otime($dataArra y['duration']));
?>
<td background="ima ges/barSilver.jpg" width="30"><?=( $recordCount +
1)?></td>
<td width="4">  ;</td>
<td>
<div class="div_info " style="position : absolute; width: 400px;
z-index: 1; visibility: hidden;" id="infoLayer_< ?=$recordCount? >"
align="left"><b ><u><?=$dataArr ay['title']?></u></b><p><u>Starrin g:</u><br><i
>
>><?=$dataArr ay['starring']?></i></p><p><?=$dataAr ray['synopsis']?></p></div
<?
if($dataArray['dvd_image'] == "None")
{
?>
<img id="img_<?=$rec ordCount?>" width="50" height="70"
src="images/dvds/none_small.jpg"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
<?
}
else
{
?>
<img id="img_<?=$rec ordCount?>" width="50" height="70"
src="images/dvds/<?=$dataArray['dvd_image']?>"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
<?
}
echo " <img
src='images/certs/".$certImag e[$dataArray['certificate']].".gif'><BR>".$ data
Array['title'];
?>
</td>
<td width="4">  ;</td>
<td><b>Released </b><br><?=$dataA rray['year']?><br>
<b>Duration</b><br><?=$dataA rray['duration']?><br>
<b>Rating</b><br><img alt="Rating: <?=$dataArray['rating']/2?>"
align="absmiddl e"
src="images/ratings/pips<?=$dataArr ay['rating']?>.gif"></td>
<td width="4">  ;</td>
<?
$recordCount++;
}
?>
</tr>
<?
}
}
----------------------------------
"Ian Davies" <ia********@vir gin.netwrote in message
news:j3******** *******@newsfe3-win.ntli.net...
Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns 'category',
'comment' and share (the category column also holds the index no of
the
record in a hidden field)
I wish the user to be able to edit the data in the table, so I have
extracted the records into hiddenfield, textareas, dropdown list and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to take each
row
in
turn (and any changes made) and update the mysql table. I did
something
similar with just one record but am stuck as to how I use the arrays
of
a
number of form elements together
My code for the table is below but I dont know how the script should
go
when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
*************** *************** *************** *************** **********
<form action="comment select.php" method="post"
enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo
$row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE username
=
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID']; ?>"><?php
echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php echo
$commindex;
?>"></td>
<td width="60%" align="left" class="bodytext " <textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo $comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input
type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?>>
</td>
</tr>
<?php
}
?>
</table>
</form>
*************** *************** *************** ***************
I'm presuming comment is the textbox (or do you use textarea), category is
the dropdown and share is the checkbox?
I'm working on a solution now so I'm hoping I have it right.
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message
news:Q9******** **********@news fe2-win.ntli.net...
Hi
I am trying to amend three fields all one text and two integer
In my original code you will see what I mean
The values for the text field would come from a textarea in one column of
the table and the values for the two integer fields would come from a
dropdown list and a tick box which are in the other columns.
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:MQ******** *******@newsfe3-win.ntli.net...
>Yes, that explains it much better. Which field is it you are trying to amend? Is it a simple yes/no type field? If so then you need to adjust your query accordingly. I don't have time right now to explain fully but
if
>you send me a personal email to orion at psiss dot com I will try and explain how I would approach it.
Regards
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message news:Bw******* ***********@new sfe1-win.ntli.net...
Thanks for the reply
The problem Im having isnt creating a table with the records in it.
That
works fine. Im trying to find a way where the users can modify the
records
in a table and they are all updated in one go. I thought using arrays
would
be the answer, but Im not that familiar with them. At the moment the
users
click a button at the begining of a row and that record is displated on
a
new page where it can be updated. But this requires the user to click
and
update one record at a time. Whereas I wish them to make all the
changes
to
all the records they want in the table and then on clicking a button
some
script would take each row in turn and update that row in te database,
it
would then loop through all the rows in the table and update each
accordingly
Hope this explains it better
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:uF******** **********@news fe6-gui.ntli.net... If I understand you correctly, the way I would do it is the same way I
have my DVD database. This is rather than have the name of the elements as "commindex[]" etc, actually place the table creation inside your while
loop and increment the naming field using the i variable you use, ie: "commindex[<?=$i?>]".
As an example of what I mean, here is an excerpt of my DVD database
code
>which you can view at "http:// mydvds . psiss . com"
------------------------------------------------------ if($allRecor ds 0) { $recordCount = 0; while($recordCo unt < $allRecords) { if(($recordCoun t / 2) % 2 == 1) { ?> <tr align="center" class="tr_even" > <? } else { ?> <tr align="center" class="tr_odd"> <? } for($colCount = 0; $colCount < 2 && $recordCount < $allRecords; $colCount++) { $dataArray = mysql_fetch_arr ay($result); $dataArray['starring'] =
str_replace("\r ","<BR>",$dataA rray['starring']); $dataArray['synopsis'] =
str_replace("\r ","<BR>",$dataA rray['synopsis']); $dataArray['duration'] = date('H:i',str totime($dataArr ay['duration'])); ?> <td background="ima ges/barSilver.jpg" width="30"><?=( $recordCount + 1)?></td> <td width="4">  ;</td> <td> <div class="div_info " style="position : absolute; width: 400px; z-index: 1; visibility: hidden;" id="infoLayer_< ?=$recordCount? >"
align="left"><b ><u><?=$dataArr ay['title']?></u></b><p><u>Starrin g:</u><br><i
>>
>>><?=$dataArra y['starring']?></i></p><p><?=$dataAr ray['synopsis']?></p></div
><? if($dataArray['dvd_image'] == "None") { ?> <img id="img_<?=$rec ordCount?>" width="50" height="70" src="images/dvds/none_small.jpg"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width + 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')"> <? } else { ?> <img id="img_<?=$rec ordCount?>" width="50" height="70" src="images/dvds/<?=$dataArray['dvd_image']?>"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width + 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')"> <? } echo " <img
src='images/certs/".$certImag e[$dataArray['certificate']].".gif'><BR>".$ data
Array['title']; ?> </td> <td width="4">  ;</td> <td><b>Released </b><br><?=$dataA rray['year']?><br> <b>Duration</b><br><?=$dataA rray['duration']?><br> <b>Rating</b><br><img alt="Rating: <?=$dataArray['rating']/2?>" align="absmidd le" src="images/ratings/pips<?=$dataArr ay['rating']?>.gif"></td> <td width="4">  ;</td> <? $recordCount++; } ?> </tr> <? } } ----------------------------------
"Ian Davies" <ia********@vir gin.netwrote in message news:j3******* ********@newsfe 3-win.ntli.net...
Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns
'category',
'comment' and share (the category column also holds the index no of
the
record in a hidden field)
I wish the user to be able to edit the data in the table, so I have
extracted the records into hiddenfield, textareas, dropdown list and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to take each
row
in
turn (and any changes made) and update the mysql table. I did
something
similar with just one record but am stuck as to how I use the arrays
of
a
number of form elements together
My code for the table is below but I dont know how the script should
go
when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
*************** *************** *************** *************** **********
<form action="comment select.php" method="post"
enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo
$row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE username
=
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID']; ?>"><?php
echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php echo
$commindex;
?>"></td>
<td width="60%" align="left" class="bodytext " <textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo $comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input
type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?>>
</td>
</tr>
<?php
}
?>
</table>
</form>
*************** *************** *************** ***************
Hello
That is correct. also comment is a textarea. and a hidden field to contain
the index of each row to use to update the correct record in the subsequent
sql statement.
Is your solution somehow based on creating an array from each of the
elements.
The solution i was trying to do was to get 4 arrays and somehow use them in
a loop with an sql update. But Im lost as to how to create and use the
arrays appropriately
Cheers
Ian
also I greatly appreciate your assistance
"PSI_Orion" <or***@psiss.co mwrote in message
news:e7******** **********@news fe1-win.ntli.net...
I'm presuming comment is the textbox (or do you use textarea), category is
the dropdown and share is the checkbox?
I'm working on a solution now so I'm hoping I have it right.
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message
news:Q9******** **********@news fe2-win.ntli.net...
Hi
I am trying to amend three fields all one text and two integer
In my original code you will see what I mean
The values for the text field would come from a textarea in one column
of
the table and the values for the two integer fields would come from a
dropdown list and a tick box which are in the other columns.
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:MQ******** *******@newsfe3-win.ntli.net...
Yes, that explains it much better. Which field is it you are trying to
amend? Is it a simple yes/no type field? If so then you need to
adjust
your query accordingly. I don't have time right now to explain fully
but
if
you send me a personal email to orion at psiss dot com I will try and
explain how I would approach it.
Regards
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message
news:Bw******** **********@news fe1-win.ntli.net...
Thanks for the reply
The problem Im having isnt creating a table with the records in it.
That
works fine. Im trying to find a way where the users can modify the
records
in a table and they are all updated in one go. I thought using arrays
would
be the answer, but Im not that familiar with them. At the moment the
users
click a button at the begining of a row and that record is displated
on
a
new page where it can be updated. But this requires the user to click
and
update one record at a time. Whereas I wish them to make all the
changes
to
all the records they want in the table and then on clicking a button
some
script would take each row in turn and update that row in te
database,
it
would then loop through all the rows in the table and update each
accordingly
Hope this explains it better
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:uF******** **********@news fe6-gui.ntli.net...
If I understand you correctly, the way I would do it is the same way
I
have
my DVD database. This is rather than have the name of the elements
as
"commindex[]" etc, actually place the table creation inside your
while
loop
and increment the naming field using the i variable you use, ie:
"commindex[<?=$i?>]".
As an example of what I mean, here is an excerpt of my DVD database
code
which you can view at "http:// mydvds . psiss . com"
------------------------------------------------------
if($allRecords 0)
{
$recordCount = 0;
while($recordCo unt < $allRecords)
{
if(($recordCoun t / 2) % 2 == 1)
{
?>
<tr align="center" class="tr_even" >
<?
}
else
{
?>
<tr align="center" class="tr_odd">
<?
}
for($colCount = 0; $colCount < 2 && $recordCount < $allRecords;
$colCount++)
{
$dataArray = mysql_fetch_arr ay($result);
$dataArray['starring'] =
str_replace("\r ","<BR>",$dataA rray['starring']);
$dataArray['synopsis'] =
str_replace("\r ","<BR>",$dataA rray['synopsis']);
$dataArray['duration'] =
date('H:i',strt otime($dataArra y['duration']));
?>
<td background="ima ges/barSilver.jpg" width="30"><?=( $recordCount
+
1)?></td>
<td width="4">  ;</td>
<td>
<div class="div_info " style="position : absolute; width: 400px;
z-index: 1; visibility: hidden;" id="infoLayer_< ?=$recordCount? >"
align="left"><b ><u><?=$dataArr ay['title']?></u></b><p><u>Starrin g:</u><br><i
>
>>><?=$dataArra y['starring']?></i></p><p><?=$dataAr ray['synopsis']?></p></di
v
>
<?
if($dataArray['dvd_image'] == "None")
{
?>
<img id="img_<?=$rec ordCount?>" width="50" height="70"
src="images/dvds/none_small.jpg"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
<?
}
else
{
?>
<img id="img_<?=$rec ordCount?>" width="50" height="70"
src="images/dvds/<?=$dataArray['dvd_image']?>"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
<?
}
echo " <img
src='images/certs/".$certImag e[$dataArray['certificate']].".gif'><BR>".$ data
Array['title'];
?>
</td>
<td width="4">  ;</td>
<td><b>Released </b><br><?=$dataA rray['year']?><br>
<b>Duration</b><br><?=$dataA rray['duration']?><br>
<b>Rating</b><br><img alt="Rating: <?=$dataArray['rating']/2?>"
align="absmiddl e"
src="images/ratings/pips<?=$dataArr ay['rating']?>.gif"></td>
<td width="4">  ;</td>
<?
$recordCount++;
}
?>
</tr>
<?
}
}
----------------------------------
"Ian Davies" <ia********@vir gin.netwrote in message
news:j3******** *******@newsfe3-win.ntli.net...
Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns
'category',
'comment' and share (the category column also holds the index no
of
the
record in a hidden field)
I wish the user to be able to edit the data in the table, so I
have
extracted the records into hiddenfield, textareas, dropdown list
and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to take
each
row
in
turn (and any changes made) and update the mysql table. I did
something
similar with just one record but am stuck as to how I use the
arrays
of
a
number of form elements together
My code for the table is below but I dont know how the script
should
go
when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
*************** *************** *************** *************** **********
<form action="comment select.php" method="post"
enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo
$row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE
username
=
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID'];
?>"><?php
echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php echo
$commindex;
?>"></td>
<td width="60%" align="left" class="bodytext " <textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo $comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input
type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?>>
</td>
</tr>
<?php
}
?>
</table>
</form>
*************** *************** *************** ***************
'....and a hidden field to contain...'
SHOULD READ
'....and I also have a hidden field that contains...'
ian
"Ian Davies" <ia********@vir gin.netwrote in message
news:EJ******** ***********@new sfe4-win.ntli.net...
Hello
That is correct. also comment is a textarea. and a hidden field to contain
the index of each row to use to update the correct record in the
subsequent
sql statement.
Is your solution somehow based on creating an array from each of the
elements.
The solution i was trying to do was to get 4 arrays and somehow use them
in
a loop with an sql update. But Im lost as to how to create and use the
arrays appropriately
Cheers
Ian
also I greatly appreciate your assistance
"PSI_Orion" <or***@psiss.co mwrote in message
news:e7******** **********@news fe1-win.ntli.net...
I'm presuming comment is the textbox (or do you use textarea), category
is
the dropdown and share is the checkbox?
I'm working on a solution now so I'm hoping I have it right.
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message
news:Q9******** **********@news fe2-win.ntli.net...
Hi
I am trying to amend three fields all one text and two integer
In my original code you will see what I mean
The values for the text field would come from a textarea in one column
of
the table and the values for the two integer fields would come from a
dropdown list and a tick box which are in the other columns.
Ian
>
>
"PSI_Orion" <or***@psiss.co mwrote in message
news:MQ******** *******@newsfe3-win.ntli.net...
>Yes, that explains it much better. Which field is it you are trying
to
>amend? Is it a simple yes/no type field? If so then you need to
adjust
>your query accordingly. I don't have time right now to explain fully
but
if
>you send me a personal email to orion at psiss dot com I will try and
>explain how I would approach it.
>>
>Regards
>>
>PSI_Orion
>>
>"Ian Davies" <ia********@vir gin.netwrote in message
>news:Bw******* ***********@new sfe1-win.ntli.net...
Thanks for the reply
The problem Im having isnt creating a table with the records in it.
That
works fine. Im trying to find a way where the users can modify the
records
in a table and they are all updated in one go. I thought using
arrays
would
be the answer, but Im not that familiar with them. At the moment
the
users
click a button at the begining of a row and that record is
displated
on
a
new page where it can be updated. But this requires the user to
click
and
update one record at a time. Whereas I wish them to make all the
changes
to
all the records they want in the table and then on clicking a
button
some
script would take each row in turn and update that row in te
database,
it
would then loop through all the rows in the table and update each
accordingly
>
Hope this explains it better
>
Ian
>
"PSI_Orion" <or***@psiss.co mwrote in message
news:uF******** **********@news fe6-gui.ntli.net...
>If I understand you correctly, the way I would do it is the same
way
I
have
>my DVD database. This is rather than have the name of the
elements
as
>"commindex[]" etc, actually place the table creation inside your
while
loop
>and increment the naming field using the i variable you use, ie:
>"commindex[<?=$i?>]".
>>
>As an example of what I mean, here is an excerpt of my DVD
database
code
>which you can view at "http:// mydvds . psiss . com"
>>
>------------------------------------------------------
>if($allRecor ds 0)
>{
> $recordCount = 0;
> while($recordCo unt < $allRecords)
> {
> if(($recordCoun t / 2) % 2 == 1)
> {
>?>
> <tr align="center" class="tr_even" >
><?
> }
> else
> {
>?>
> <tr align="center" class="tr_odd">
><?
> }
> for($colCount = 0; $colCount < 2 && $recordCount < $allRecords;
>$colCount++)
> {
> $dataArray = mysql_fetch_arr ay($result);
> $dataArray['starring'] =
str_replace("\r ","<BR>",$dataA rray['starring']);
> $dataArray['synopsis'] =
str_replace("\r ","<BR>",$dataA rray['synopsis']);
> $dataArray['duration'] =
>date('H:i',str totime($dataArr ay['duration']));
>?>
> <td background="ima ges/barSilver.jpg"
width="30"><?=( $recordCount
+
>1)?></td>
> <td width="4">  ;</td>
> <td>
> <div class="div_info " style="position : absolute; width:
400px;
>z-index: 1; visibility: hidden;" id="infoLayer_< ?=$recordCount? >"
>>
>
>
align="left"><b ><u><?=$dataArr ay['title']?></u></b><p><u>Starrin g:</u><br><i
>>
>>><?=$dataArra y['starring']?></i></p><p><?=$dataAr ray['synopsis']?></p></di
v
>>
><?
> if($dataArray['dvd_image'] == "None")
> {
>?>
> <img id="img_<?=$rec ordCount?>" width="50" height="70"
>src="images/dvds/none_small.jpg"
>>
>
>
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
>+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
><?
> }
> else
> {
>?>
> <img id="img_<?=$rec ordCount?>" width="50" height="70"
>src="images/dvds/<?=$dataArray['dvd_image']?>"
>>
>
>
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
>+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
><?
> }
> echo " <img
>>
>
>
src='images/certs/".$certImag e[$dataArray['certificate']].".gif'><BR>".$ data
Array['title'];
>?>
> </td>
> <td width="4">  ;</td>
> <td><b>Released </b><br><?=$dataA rray['year']?><br>
> <b>Duration</b><br><?=$dataA rray['duration']?><br>
> <b>Rating</b><br><img alt="Rating: <?=$dataArray['rating']/2?>"
>align="absmidd le"
>src="images/ratings/pips<?=$dataArr ay['rating']?>.gif"></td>
> <td width="4">  ;</td>
><?
> $recordCount++;
> }
>?>
> </tr>
><?
> }
>}
>----------------------------------
>>
>>
>"Ian Davies" <ia********@vir gin.netwrote in message
>news:j3******* ********@newsfe 3-win.ntli.net...
Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns
'category',
'comment' and share (the category column also holds the index no
of
the
record in a hidden field)
I wish the user to be able to edit the data in the table, so I
have
extracted the records into hiddenfield, textareas, dropdown list
and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to take
each
row
in
turn (and any changes made) and update the mysql table. I did
something
similar with just one record but am stuck as to how I use the
arrays
of
a
number of form elements together
>
My code for the table is below but I dont know how the script
should
go
when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
>
*************** *************** *************** *************** **********
<form action="comment select.php" method="post"
enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
>
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
>
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo
$row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE
username
=
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID'];
?>"><?php
echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php echo
$commindex;
?>"></td>
<td width="60%" align="left" class="bodytext ">
<textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo $comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input
type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?>>
</td>
</tr>
<?php
}
?>
</table>
</form>
>
*************** *************** *************** ***************
>
>
>>
>>
>
>
>>
>>
>
>
Take a look at http://www.psiss.com/dummy to see if I'm on the right lines.
Obviously it's not nicely formatted and the "Update" checkboxes would be
hidden and automatically set on an onchange event in the fields. Also, it
doesn't actually do any changes right now as I need to work on that more but
I wanted to make sure I'm on the right lines first. Just tick some update
checkboxes, click submit and see if that's what you are after.
Chris
"Ian Davies" <ia********@vir gin.netwrote in message
news:KL******** **********@news fe4-win.ntli.net...
'....and a hidden field to contain...'
SHOULD READ
'....and I also have a hidden field that contains...'
ian
"Ian Davies" <ia********@vir gin.netwrote in message
news:EJ******** ***********@new sfe4-win.ntli.net...
>Hello That is correct. also comment is a textarea. and a hidden field to contain the index of each row to use to update the correct record in the
subsequent
>sql statement.
Is your solution somehow based on creating an array from each of the elements. The solution i was trying to do was to get 4 arrays and somehow use them
in
>a loop with an sql update. But Im lost as to how to create and use the arrays appropriately
Cheers Ian also I greatly appreciate your assistance
"PSI_Orion" <or***@psiss.co mwrote in message news:e7******* ***********@new sfe1-win.ntli.net...
I'm presuming comment is the textbox (or do you use textarea), category
is
the dropdown and share is the checkbox?
I'm working on a solution now so I'm hoping I have it right.
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message
news:Q9******** **********@news fe2-win.ntli.net...
Hi
I am trying to amend three fields all one text and two integer
In my original code you will see what I mean
The values for the text field would come from a textarea in one
column
of
the table and the values for the two integer fields would come from a
dropdown list and a tick box which are in the other columns.
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:MQ******** *******@newsfe3-win.ntli.net... Yes, that explains it much better. Which field is it you are trying
to
>amend? Is it a simple yes/no type field? If so then you need to
adjust
>your query accordingly. I don't have time right now to explain fully
but
if you send me a personal email to orion at psiss dot com I will try and explain how I would approach it.
Regards
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message news:Bw******* ***********@new sfe1-win.ntli.net...
Thanks for the reply
The problem Im having isnt creating a table with the records in
it.
That
works fine. Im trying to find a way where the users can modify the
records
in a table and they are all updated in one go. I thought using
arrays
would
be the answer, but Im not that familiar with them. At the moment
the
users
click a button at the begining of a row and that record is
displated
>on
a
new page where it can be updated. But this requires the user to
click
and
update one record at a time. Whereas I wish them to make all the
changes
to
all the records they want in the table and then on clicking a
button
some
script would take each row in turn and update that row in te
database,
it
would then loop through all the rows in the table and update each
accordingly
Hope this explains it better
Ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:uF******** **********@news fe6-gui.ntli.net... If I understand you correctly, the way I would do it is the same
way
>I
have my DVD database. This is rather than have the name of the
elements
>as
>"commindex[]" etc, actually place the table creation inside your
while
loop and increment the naming field using the i variable you use, ie: "commindex[<?=$i?>]".
As an example of what I mean, here is an excerpt of my DVD
database
code which you can view at "http:// mydvds . psiss . com"
------------------------------------------------------ if($allRecor ds 0) { $recordCount = 0; while($recordCo unt < $allRecords) { if(($recordCoun t / 2) % 2 == 1) { ?> <tr align="center" class="tr_even" > <? } else { ?> <tr align="center" class="tr_odd"> <? } for($colCount = 0; $colCount < 2 && $recordCount < $allRecords; $colCount++) { $dataArray = mysql_fetch_arr ay($result); $dataArray['starring'] =
str_replace("\r ","<BR>",$dataA rray['starring']); $dataArray['synopsis'] =
str_replace("\r ","<BR>",$dataA rray['synopsis']); $dataArray['duration'] = date('H:i',str totime($dataArr ay['duration'])); ?> <td background="ima ges/barSilver.jpg"
width="30"><?=( $recordCount
>+
>1)?></td> <td width="4">  ;</td> <td> <div class="div_info " style="position : absolute; width:
400px;
>z-index: 1; visibility: hidden;" id="infoLayer_< ?=$recordCount? >"
align="left"><b ><u><?=$dataArr ay['title']?></u></b><p><u>Starrin g:</u><br><i
>>
>>>><?=$dataArr ay['starring']?></i></p><p><?=$dataAr ray['synopsis']?></p></di
v
>> <? if($dataArray['dvd_image'] == "None") { ?> <img id="img_<?=$rec ordCount?>" width="50" height="70" src="images/dvds/none_small.jpg"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width + 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')"> <? } else { ?> <img id="img_<?=$rec ordCount?>" width="50" height="70" src="images/dvds/<?=$dataArray['dvd_image']?>"
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width + 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')"> <? } echo " <img
src='images/certs/".$certImag e[$dataArray['certificate']].".gif'><BR>".$ data
Array['title']; ?> </td> <td width="4">  ;</td> <td><b>Released </b><br><?=$dataA rray['year']?><br> <b>Duration</b><br><?=$dataA rray['duration']?><br> <b>Rating</b><br><img alt="Rating: <?=$dataArra y['rating']/2?>" align="absmidd le" src="images/ratings/pips<?=$dataArr ay['rating']?>.gif"></td> <td width="4">  ;</td> <? $recordCount++; } ?> </tr> <? } } ----------------------------------
"Ian Davies" <ia********@vir gin.netwrote in message news:j3******* ********@newsfe 3-win.ntli.net...
Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns
'category',
'comment' and share (the category column also holds the index
no
of
the
record in a hidden field)
I wish the user to be able to edit the data in the table, so I
have
extracted the records into hiddenfield, textareas, dropdown
list
and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to take
each
row
in
turn (and any changes made) and update the mysql table. I did
something
similar with just one record but am stuck as to how I use the
arrays
of
a
number of form elements together
My code for the table is below but I dont know how the script
should
go
when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
*************** *************** *************** *************** **********
<form action="comment select.php" method="post"
enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo
$row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE
username
=
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID'];
?>"><?php
echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php echo
$commindex;
?>"></td>
<td width="60%" align="left" class="bodytext ">
<textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo $comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input
type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?>>
</td>
</tr>
<?php
}
?>
</table>
</form>
*************** *************** *************** ***************
Yes thats exactly what I have so far. except I dont have an update check
box, which I didnt include because I suspect some users would make changes
to the comments and categories etc but would forget to tick the update check
box. My solution was to update ALL the displayed records. this wouldnt be a
problem as there would only be about between 5 and 100 so not a big deal if
some are updated despite no changes being made. Also I dont have the ID
displayed (its meaninless to the user), its in a hidden field which I
planned to use to reference the correct record from the database table
ian
"PSI_Orion" <or***@psiss.co mwrote in message
news:aE******** ***********@new sfe6-gui.ntli.net...
Take a look at http://www.psiss.com/dummy to see if I'm on the right
lines.
Obviously it's not nicely formatted and the "Update" checkboxes would be
hidden and automatically set on an onchange event in the fields. Also, it
doesn't actually do any changes right now as I need to work on that more
but
I wanted to make sure I'm on the right lines first. Just tick some update
checkboxes, click submit and see if that's what you are after.
Chris
"Ian Davies" <ia********@vir gin.netwrote in message
news:KL******** **********@news fe4-win.ntli.net...
'....and a hidden field to contain...'
SHOULD READ
'....and I also have a hidden field that contains...'
ian
"Ian Davies" <ia********@vir gin.netwrote in message
news:EJ******** ***********@new sfe4-win.ntli.net...
Hello
That is correct. also comment is a textarea. and a hidden field to
contain
the index of each row to use to update the correct record in the
subsequent
sql statement.
Is your solution somehow based on creating an array from each of the
elements.
The solution i was trying to do was to get 4 arrays and somehow use
them
in
a loop with an sql update. But Im lost as to how to create and use the
arrays appropriately
Cheers
Ian
also I greatly appreciate your assistance
"PSI_Orion" <or***@psiss.co mwrote in message
news:e7******** **********@news fe1-win.ntli.net...
I'm presuming comment is the textbox (or do you use textarea),
category
is
the dropdown and share is the checkbox?
I'm working on a solution now so I'm hoping I have it right.
PSI_Orion
"Ian Davies" <ia********@vir gin.netwrote in message
news:Q9******** **********@news fe2-win.ntli.net...
Hi
I am trying to amend three fields all one text and two integer
In my original code you will see what I mean
The values for the text field would come from a textarea in one
column
of
the table and the values for the two integer fields would come from
a
dropdown list and a tick box which are in the other columns.
Ian
>
>
"PSI_Orion" <or***@psiss.co mwrote in message
news:MQ******** *******@newsfe3-win.ntli.net...
>Yes, that explains it much better. Which field is it you are
trying
to
>amend? Is it a simple yes/no type field? If so then you need to
adjust
>your query accordingly. I don't have time right now to explain
>fully
but
if
>you send me a personal email to orion at psiss dot com I will try
>and
>explain how I would approach it.
>>
>Regards
>>
>PSI_Orion
>>
>"Ian Davies" <ia********@vir gin.netwrote in message
>news:Bw******* ***********@new sfe1-win.ntli.net...
Thanks for the reply
The problem Im having isnt creating a table with the records in
it.
That
works fine. Im trying to find a way where the users can modify
the
records
in a table and they are all updated in one go. I thought using
arrays
would
be the answer, but Im not that familiar with them. At the moment
the
users
click a button at the begining of a row and that record is
displated
on
a
new page where it can be updated. But this requires the user to
click
and
update one record at a time. Whereas I wish them to make all the
changes
to
all the records they want in the table and then on clicking a
button
some
script would take each row in turn and update that row in te
database,
it
would then loop through all the rows in the table and update
each
accordingly
>
Hope this explains it better
>
Ian
>
"PSI_Orion" <or***@psiss.co mwrote in message
news:uF******** **********@news fe6-gui.ntli.net...
>If I understand you correctly, the way I would do it is the
same
way
I
have
>my DVD database. This is rather than have the name of the
elements
as
>"commindex[]" etc, actually place the table creation inside
your
while
loop
>and increment the naming field using the i variable you use,
ie:
>"commindex[<?=$i?>]".
>>
>As an example of what I mean, here is an excerpt of my DVD
database
code
>which you can view at "http:// mydvds . psiss . com"
>>
>------------------------------------------------------
>if($allRecor ds 0)
>{
> $recordCount = 0;
> while($recordCo unt < $allRecords)
> {
> if(($recordCoun t / 2) % 2 == 1)
> {
>?>
> <tr align="center" class="tr_even" >
><?
> }
> else
> {
>?>
> <tr align="center" class="tr_odd">
><?
> }
> for($colCount = 0; $colCount < 2 && $recordCount <
$allRecords;
>$colCount++)
> {
> $dataArray = mysql_fetch_arr ay($result);
> $dataArray['starring'] =
str_replace("\r ","<BR>",$dataA rray['starring']);
> $dataArray['synopsis'] =
str_replace("\r ","<BR>",$dataA rray['synopsis']);
> $dataArray['duration'] =
>date('H:i',str totime($dataArr ay['duration']));
>?>
> <td background="ima ges/barSilver.jpg"
width="30"><?=( $recordCount
+
>1)?></td>
> <td width="4">  ;</td>
> <td>
> <div class="div_info " style="position : absolute; width:
400px;
>z-index: 1; visibility: hidden;"
id="infoLayer_< ?=$recordCount? >"
>>
>
>
align="left"><b ><u><?=$dataArr ay['title']?></u></b><p><u>Starrin g:</u><br><i
>>
>>>><?=$dataArr ay['starring']?></i></p><p><?=$dataAr ray['synopsis']?></p></d
i
v
>>
><?
> if($dataArray['dvd_image'] == "None")
> {
>?>
> <img id="img_<?=$rec ordCount?>" width="50" height="70"
>src="images/dvds/none_small.jpg"
>>
>
>
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
>+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
><?
> }
> else
> {
>?>
> <img id="img_<?=$rec ordCount?>" width="50" height="70"
>src="images/dvds/<?=$dataArray['dvd_image']?>"
>>
>
>
onmouseover="po pShow(this,img_ <?=$recordCount ?>,'infoLayer_< ?=$recordCount? >
',img_<?=$recor dCount?>.width
>+ 5,5)" onmouseout="pop Hide('infoLayer _<?=$recordCoun t?>')">
><?
> }
> echo " <img
>>
>
>
src='images/certs/".$certImag e[$dataArray['certificate']].".gif'><BR>".$ data
Array['title'];
>?>
> </td>
> <td width="4">  ;</td>
> <td><b>Released </b><br><?=$dataA rray['year']?><br>
> <b>Duration</b><br><?=$dataA rray['duration']?><br>
> <b>Rating</b><br><img alt="Rating:
><?=$dataArra y['rating']/2?>"
>align="absmidd le"
>src="images/ratings/pips<?=$dataArr ay['rating']?>.gif"></td>
> <td width="4">  ;</td>
><?
> $recordCount++;
> }
>?>
> </tr>
><?
> }
>}
>----------------------------------
>>
>>
>"Ian Davies" <ia********@vir gin.netwrote in message
>news:j3******* ********@newsfe 3-win.ntli.net...
Hello
Needing help with a suitable solution.
I have extracted records into a table under three columns
'category',
'comment' and share (the category column also holds the index
no
of
the
record in a hidden field)
I wish the user to be able to edit the data in the table, so
I
have
extracted the records into hiddenfield, textareas, dropdown
list
and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an sql to
take
each
row
in
turn (and any changes made) and update the mysql table. I did
something
similar with just one record but am stuck as to how I use the
arrays
of
a
number of form elements together
>
My code for the table is below but I dont know how the script
should
go
when
the form is submitted to add each row in turn
Help greatly appreciated
Ian
>
>
*************** *************** *************** *************** **********
<form action="comment select.php" method="post"
enctype="multip art/form-data"
name="UpdateCom ments">
<table width="100%" border="0" cellpadding="0"
cellspacing="2"
bgcolor="#FFFFF F">
<tr align="center" class="ListHead ing">
<td width="20%" height="31">Cat egory</td>
<td width="60%" height="31">Com ment</td>
<td width="10%" height="31">Sha re</td>
</tr>
<tr class="BodyText ">
<?php
while($row =& mysql_fetch_arr ay($commentresu lts)) {
extract($row);
>
if ($i%2) {
$class = 'row1';
echo "<TR bgcolor=\"#CCCC CC\">\n";
>
} else {
$class = 'row2';
echo "<TR bgcolor=\"white \">\n";
}
$i += 1;
?>
<td width="20%" align="left" class="bodytext "><select
name="category[]" style="WIDTH: 90%">
<option value="<?php echo $row['TypeID']; ?>"><?php echo
$row['typedesc'];
?></option>
<?php
$commenttype = mysql_query("SE LECT * FROM commenttype WHERE
username
=
'$username'");
if (!$commenttype) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while($row1 =& mysql_fetch_arr ay($commenttype )) {
extract($row1);
?>
<option value="<?php echo $row1['TypeID'];
?>"><?php
echo
$row1['typedesc']; ?><br>
</option>
<?php
}
?>
</select>
<input name="commindex[]" type="hidden" value="<?php
echo
$commindex;
?>"></td>
<td width="60%" align="left" class="bodytext ">
<textarea
name="comm[]" rows="2" style="WIDTH: 99%"><?php echo
$comment;
?></textarea></td>
<td width="10%" align="center" class="bodytext "><input
type="checkbox"
name="avail[]" value="checkbox " <?php share($availabl e); ?>>
</td>
</tr>
<?php
}
?>
</table>
</form>
>
*************** *************** *************** ***************
>
>
>>
>>
>
>
>>
>>
>
>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jason |
last post by:
Currently I have a number of html forms which loop through records in
a database table. In order to be able to update the right record when
the form is submitted, I've tacked number on to the field names, i.e.:
PHP: echo '<input type="text" name="hat_color_'.$i.'"
value="'.$currentRow.'">
<input type="text" name="favorite_food_'.$i.'"...
|
by: mursyidatun ismail |
last post by:
Dear all,
database use: Ms Access.
platform: .Net
i'm trying to update a record/records in a table called t_doctors by
clicking da edit link provided in the database.
when i ran through da browsers and click update it gave me this error:
Specified argument was out of the range of valid values. Parameter name:
|
by: pmarisole |
last post by:
I am trying to use the vbscript "split" function on a multi-select
field. I am trying
to do a mass update of several records at a time.
I am getting an error and I'm not sure what to do. Here is the code if
someone could help...
strID = split(request.form("proj"), ", ")
projstat = split(request.form("rojstat"),",")
impr...
|
by: Roger Withnell |
last post by:
I'm using ASP, VBScript and SQL Server.
I'm also using UTF-8 character set and so my codepage is 65001 and SQL
Server datatype nvarchar.
I can insert unicode characters correctly into the database table using
INSERT.... (field1) ...VALUES ......... (N'Characters').
How do I do this using Rs.Update viz-a-viz:
|
by: cover |
last post by:
I have an input form that passes data when submitted to a second form
to let the user know what they have just entered into the db.
My question comes with using 'update'. I'd like to query the database
by equipment number (equipno is unique) and query all fields from that
row, populating an original form 'look alike' whereby the user can...
| |
by: mantrid |
last post by:
Im using arrays generated from my records displayed in a table on my site to
update the corresponding records in a mysql database ie
on the web page
col1 col2 col3
1 2 2
1 6
2 7 4
which I post to next page as col1array col2array col3array problem is some
|
by: MLH |
last post by:
Suppose, in a multi-user environment, you
have append query SQL in a VBA procedure
that looks like INSERT INTO MyTable...
and the next line reads MyVar=DMax("","MyTable...
You can never be certain that MyVar will be
set to the key-field value that was created
when the Append query ran. Now, there are
other ways to do it - I know - that...
|
by: javediq143 |
last post by:
Hi All,
This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in Database but I'm stuck in the EDIT. I'm getting 2 problems over here. Below is the description:
1)The FIRST page will list all the records from the...
|
by: planethax |
last post by:
I have multiple arrays that I need to insert/update database and I am not sure how to start, I think I need to use the "foreach" statement and also not sure whether or not to serialize and unserialize?
this info is then going to be used to populate a table.
This is what I have so far
<?php
$url =...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |