Jump to content

jawood

New Members
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

jawood's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. That did it changing that last time to time1 thanks very much. Thou can I ask just one other question How to do change the increments on the vertical axis from 300 600 900 to say from -10 to 1100 in steps of say 20
  2. thanks I made the suggested change and still not getting any data displayed. should it be ORDER BY time1 ?
  3. Hi hoping someone can help with an issue im having displaying data from a MySQL database with php. Attached is a copy of the code its the first graph at the top that I cant get to display the data. It wont display the minutes along the bottom or draw the graph lines. The page is located at www.inshome.net.au/dashboard.php I have a feeling its to do with the getting the time from the table! MYSQL table id event timestamp current_timestamp dht22temp varchar(10) humidity varchar(10) bmp180temp varchar(10) pressure varchar(10) altitude varchar(10) current0 varchar(10) current1 varchar(10) code.php
  4. thanks.. If I change $yscale1 to anything but 1 I get no line on the graph. If I set $yscale1 to 1 and change $yscale2 the drawn line moves up the graph but the space between each point on the vertical axis stays the same. As its a temperature log and temperature changes are only small 1 or 2 degrees throughout the day a small step in the line graph is hard to see. Im not sure the above is achieving this goal.
  5. Thanks for your input, that seems to have fixed it. I only used the echo to test that I was getting the right data thru. One more thing thou how do I change the scale of the vertical axis?
  6. Hoping someone can help me with a problem I having with drawing a line graph with gd php mysql Am trying to draw a simple line graph getting data from a MySQL database. attached is the code:- I just get lots of rubbish characters on the screen. If I echo the contents of the fetched data it is correct and if I echo the $x2 and $y2 the data looks fine. Am at a loss! Any ideas would be appreciated. This is the page: www.inshome.net.au/test.php graph.php
  7. Well the code prints out the home and away teams of a footy match with radio buttons to select the winning teams and a submit button. When you select the winning teams and hit the sun\bmit button it should print out the teams and the winner of the match but all i get is the teams with a blank where the winner should be....
  8. Hi, hopping someone can help with a problem im having getting a vaiable assigned to a radio button name. the code is as follows.. The bits in bold are where my problem lies... Any assistance would be great, thanks <?php # add_winning_teams.php session_name ('YourVisitID'); session_start(); $page_title = 'Add Winning Teams!'; include ('./includes/header.html'); include_once ('./includes/databaseconnect.php'); echo "<h1>Select Winners</h1>"; $dayname = date("l"); $daydate = date("d"); $month = date("F"); $year = date("o"); //$match = array(); if (isset($_POST['submitted'])) { $gw = escape_data($_POST['game_week']); $query = "SELECT match_id, home_team, away_team, game_day_name, game_day, game_month, game_year, game_week FROM matches WHERE (game_week='$gw')"; $result = mysql_query ($query); echo "<h2>Check the winners</h2>"; $i = 1; while($row = mysql_fetch_array($result)) { echo $row[1] . '<input type="radio" name="match' . $row[0] . '" value="' . $row[1] . '" /> Vs ' . $row[2]; $i++; echo "<input type='radio' name='$row[0]' value='$row[2]' />"; echo " on $row[3] the $row[4]th of $row[5] $row[6]<br />"; $i++; } ?> <form action="add_winning_teams.php" method="post"/> <br /><input type='submit' name='submit1' value='Submit Winners'/> <?php } if (isset($_POST['submit1'])) { echo "<br /><br />Submitted"; $query = "SELECT match_id, home_team, away_team, game_day_name, game_day, game_month, game_year, game_week FROM matches WHERE (game_week='$gw')"; $result = mysql_query ($query); while ($row = mysql_fetch_array($result)) { echo "<br />Winner of match $row[1] Vs $row[2] is " . $_POST['match'] . " "; } //foreach ($_POST['match{$row[0]}'] as $msg) { // Print each error. // echo " $msg<br />\n"; // } } ?> <h3>Select Round to View.</h3> <form action="add_winning_teams.php" method="post"> <p><label><select name="game_week" id="game_week"> <option selected="selected"><?php if (isset($_POST['game_week'])) { echo $_POST['game_week']; } else { echo "1"; } ?></option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> <option>11</option> <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option> <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option> <option>24</option> <option>25</option> </select> </label></p> <p><input type="submit" name="submit" value="View" /></p> <input type="hidden" name="submitted" value="TRUE" /> </form> <?php include ('./includes/footer.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.