PHP - Moved: Change The Functuion Of A Button
This topic has been moved to PHP Applications.
http://www.phpfreaks.com/forums/index.php?topic=351591.0 Similar TutorialsThis topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=350095.0 I don't know many things in php yet so i need help to find out how to set a button to change value of "Confirmed" row from 0 to 1 in table "sales". I commented "This Button" at the beginning of the button i want to do the process. <?php $conn = $pdo->open(); try{ $stmt = $conn->prepare("SELECT *, sales.id AS salesid FROM sales LEFT JOIN users ON users.id=sales.user_id ORDER BY sales_date DESC"); $stmt->execute(); foreach($stmt as $row){ $stmt = $conn->prepare("SELECT * FROM details LEFT JOIN products ON products.id=details.product_id WHERE details.sales_id=:id"); $stmt->execute(['id'=>$row['salesid']]); $total = 0; foreach($stmt as $details){ $subtotal = $details['price']*$details['quantity']; $total += $subtotal; } if($row['Confirmed'] == 0){ echo " <tr> <td class='hidden'></td> <td>".date('M d, Y', strtotime($row['sales_date']))."</td> <td>".$row['firstname'].' '.$row['lastname']."</td> <td>".$row['country'].' , '.$row['city']." , ".$row['address']."</td> <td width='25px;'>₺ ".number_format($total, 2)."</td> <td width='18px;'><button type='button' class='btn btn-info btn-sm btn-flat transact' data-id='".$row['salesid']."'><i class='fa fa-search'></i> View</button></td> <td width='18px;'> <!-- This Button --> <button type='button' class='btn btn-success btn-sm btn-flat confirm' data-id='".$row['salesid']."'><i class='fa fa-check'></i> Confirm</button></td> </tr> "; } } } catch(PDOException $e){ echo $e->getMessage(); } $pdo->close(); ?>
I need a button in php to change my background color every 5 presses with a random one, every five presses the color have to change once and need to stay for the next 5 presses. here is my code <head>
<title>click 5 times</title> Hi all , here is a question about a disabled button . If I have a button: Code: [Select] <input id='submit' type='submit' disabled='disabled' value='submit'> Is it possible to change the "disabled=true" through php function ? such as Code: [Select] function change_button(){ echo "<script language=\"javascript\">"; echo "document.getElementById('submit').disabled=true;"; echo "</script>"; } I tried it , not working...is this function possible or have I make any mistake ? Thanks for every reply . Hi,
I have the following submit button and would like to change it into a link with a class.
<input type="image" alt="Click here to Continue" name="I2" src="altimages/buttons/continue.gif" id="submit">How would I do this using jQuery? Thanks! I have to radio buttons at the login page. Both of them are in group1. The value of the first is 'fancy', the value of the second is 'fast'. Also note that the buttons are on the login page, and i want to change the bg on the main page. This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=316053.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=330989.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=342929.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=346762.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=342245.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=308101.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347058.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=319719.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=305930.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=357414.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=350544.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=353240.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=322814.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=346803.0 |