Hi all,
Im having trouble to get the beneath script to work the thing i can't seem to get workin is the following.
The page requests the data from a mysql table using mysql array so there are mutliple row's every row has 3 data
colloms 1 id (auto increment) 2 Module name 3 status. after every row the is a submit button so you can submit data from that row (basilcy a on and off button) when i have more than 1 row it doesnt work.
With 1 row it works but have to press the submitt buton twice.
Any help will be appreciated
Regards Djunity
<div class="content">
<br />
<a href="?page=view">Module overzicht</a> <br />
<br / >
<p><a href="?page=add" class="button"><span class="ui-icon ui-icon-plusthick"> </span>Module toevoegen </a></p>
<table id="myTable" class="tablesorter" style="width: 100%;" border="0" cellpadding="0" cellspacing="1" > <thead>
<tr>
<td height="25px" width="120"><b> Module naam:</b></td>
<td height="25px" width="60"><b> Status:</b></td>
<td height="25px"width="70"><b> Actie:</b></td>
</tr>
</thead>
<?
// get results from database
$result = mysql_query("SELECT * FROM Wefact_Modules ORDER BY id")
or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
$form = $row['module'];
$id = $row['id'];
?>
<tbody>
<form method="post" name="form" action="?page=view">
<input type="hidden" name="id" value="<?php echo $id; ?>"/>
<input type="hidden" name="action2" value="action">
<tr class="hover">
<td height="35px"><? echo $row['module']; ?></td>
<td height="35px"><? if ($row['status'] == 1) {
echo "<font color='#00FF00'>Online</font>";
}else if ($row['status'] == 0){
echo "<font color='#FF0000'>Offline</font>"; } ?></td>
<td height="35px">
<? if ($row['status'] == 1) { ?>
<input type="hidden" name="status" value="0" /><a href="javascript: document.form.submit();" class="button"><span class="ui-icon ui-icon-minusthick"> </span>Offline</a> <?
}else if ($row['status'] == 0){ ?>
<input type="hidden" name="status" value="1" /><a href="javascript: document.form.submit();" class="button"><span class="ui-icon ui-icon-plusthick"> </span>Online</a> <? } ?> </td>
</form>
</tbody>
<? } ?>
<?
$status = $_POST['status'];
if($_REQUEST['action2'] == 'action') {
$sql = "UPDATE Wefact_Modules SET status='$status' WHERE id='$id'";
$result = mysql_query($sql);
} ?>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo those onto a PHP page.so on index.php I haveCode: <?php article_layout();?> (yes there is
Multithreading in Oracle (Java, SQLJ, Pro*C,??) on 10g
I am investigating how to run a Java stored procedure in multithread mode.I know that if I change the program to be multithreaded, the Database runs it fine, but it will not show any concurrency
HeaderSelectedCssClass not working
I have an accordian where I have a drop down list in the first pane and a grid in the second pane. When the ddl selection is changed, I programatically change the selected index of the accordian to
'210010106140040100' == '210010106140040101'
Debugging this simple line of a PHP scriptCode: if($a == $b){ } I've found that with value of$a = '210010106140040100' (type = string)$b = '210010106140040101' (type = string)the result of the
How to clone an SAP ECC using bacup tape on z/os?
We want to clone our production to a different SID using backup tape.
Array to string conversion
Can anyone help me with this?Notice: Array to string conversion in /home/..../index.php on line 360Whatever this is, it's causing the script to fail at uploading.Code (starting just before line
error reporting
hey everyoneI have a production server in which I want error reporting but only on some pagesI haveini_set('display_errors', 1);ini_set('log_errors', 1);ini_set('error_log',
Javascript using window.location seems to lose state
Not sure what forum so let me know if I'm in the wrong place.
check how many commas the variable containing the query has between [i]select[/i
Hi...iv made an sql table that contains id number - name of sql query and an sql query.The problem is that the table contains very different querys.On the first page you choose a query from a drop
Add_Months not Easy to Understand
Oracle is number 1, very fast and very easy. But....