Jump to content

sandaru1sx

New Members
  • Posts

    2
  • Joined

  • Last visited

sandaru1sx's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you very much. Don't have much programming skills. Please kindly explain where to put the switch statement exactly. <?php while($row = mysql_fetch_array($result)) { printf("<tr><td> %s </td><td> %s </td></tr>", $row["temp1"], $row["moi1"]); } mysql_free_result($result); ?> Do I have to edit the HTML tags? Can you explain how to add colors inside HTML tags. Inside <td> tags.
  2. Hi, Somehow I downloaded an example, modified and uploaded to server, also connected to mysql database. Php properly is working here insertareg.php Im new to PHP, just only know very little and earning by changing example codes. Want to do this: Only ( 0,1,2,3) will be inserted into Trays column and cells of the Trays column should change according to the inserting values as this o - red 1 - orange 2 - yellow 3 - green With the color of the cell number also should be displayed in each cell of Trays column. Help modifying the code <html> <head> <title>Data of Sensor</title> </head> <body> <h1>Data from the temperature and moisture sensors</h1> <form action="add.php" method="get"> <TABLE> <tr> <td>P Line</td> <td><input type="text" name="temp1" size="20" maxlength="30"></td> </tr> <tr> <td>Trays</td> <td><input type="text" name="moi1" size="20" maxlength="30"></td> </tr> </TABLE> <input type="submit" name="accion" value="Grabar"> </FORM> <hr> <?php include("conec.php"); $link=Conection(); $result=mysql_query("select * from tempmoi order by id desc",$link); ?> <table border="1" cellspacing="1" cellpadding="1"> <tr> <td> P Line </td> <td> Trays </td> </tr> <?php while($row = mysql_fetch_array($result)) { printf("<tr><td> %s </td><td> %s </td></tr>", $row["temp1"], $row["moi1"]); } mysql_free_result($result); ?> </table> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.