Barand Posted February 17, 2020 Share Posted February 17, 2020 (edited) I get NOTE: the 2 values you posted are arrays. The function expects strings of comma-separated values. If you prefer to pass arrays like those the query can be modified. You should also consider normalizing the data ... +-------------+ | user | +-------------+ | id |--------+ +-------------+ | firstname | | | signature | | lastname | | +-------------+ +-------------+ +--------<| user_id | | seq | | x | | y | +-------------+ Edited February 17, 2020 by Barand Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574414 Share on other sites More sharing options...
Barand Posted February 17, 2020 Share Posted February 17, 2020 You only need to query once $res = $conn->query("SELECT userid, fname, lname, sign_x, sign_y FROM winuser_demo"); $conn->query("SELECT userid, fname, lname, sign_x, sign_y FROM winuser_demo"); // <--- REMOVE THIS LINE Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574416 Share on other sites More sharing options...
winuser2003 Posted February 17, 2020 Author Share Posted February 17, 2020 33 minutes ago, Barand said: I get NOTE: the 2 values you posted are arrays. The function expects strings of comma-separated values. If you prefer to pass arrays like those the query can be modified. You should also consider normalizing the data ... +-------------+ | user | +-------------+ | id |--------+ +-------------+ | firstname | | | signature | | lastname | | +-------------+ +-------------+ +--------<| user_id | | seq | | x | | y | +-------------+ Can you help me do this? if this is a better method? how would the script look? and your result is exactly what I am looking for. Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574417 Share on other sites More sharing options...
winuser2003 Posted February 17, 2020 Author Share Posted February 17, 2020 am I also still passing in sign_x and sign_y as TEXT? I appreciate you helping me out with this project... very close to closing it... thankfully. Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574419 Share on other sites More sharing options...
Barand Posted February 17, 2020 Share Posted February 17, 2020 28 minutes ago, winuser2003 said: am I also still passing in sign_x and sign_y as TEXT They would still be a strings of comma-separated values. Changing to column type TEXT just increases the maximum storage capacity of each column to 65500 (which should be sufficient to hold the longest signature with several thousand points.) Normalising the data would allow you store the data as a series of (x,y) points which, to me, seems more logical as that is how the data is used. At the moment you have a huge block of x coordnates and another of y coordinates. Storing it this way way would be done as part of your transfer from the phone app. Question: Does the app put the data directly into the mysql db in your current format or is there some sort if interface process between the two? Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574421 Share on other sites More sharing options...
winuser2003 Posted February 17, 2020 Author Share Posted February 17, 2020 (edited) The app just directly puts the data directly into the myql db... There is an interface with form fields that get filled in, then what happens is the final step is a signature. All this is directly sent into the Mysql DB for review on a management UI which is what you and I are working together on at the moment. I know nothing of flutter / DART whatsoever... a collegue of mine is coding that part making his app connect to my DB and sending those entries directly to it. You can see from the actual DB below... this is what we been using for testing Edited February 17, 2020 by winuser2003 Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574424 Share on other sites More sharing options...
Barand Posted February 17, 2020 Share Posted February 17, 2020 Probably best to leave it as it is then; it works (if it ain't bust, don't fix it) Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574425 Share on other sites More sharing options...
winuser2003 Posted February 17, 2020 Author Share Posted February 17, 2020 so how would i make that an array from this existing code? because your image with the signature showing is exactly what I am looking for. <?php mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); $conn = mysqli_connect("localhost", "winuser2003", "homer123", "pmapptest"); $tdata = ''; $res = $conn->query("SELECT userid, fname, lname, sign_x, sign_y FROM winuser_demo"); foreach ($res as $r) { $tdata .= "<tr><td>{$r['userid']}</td> <td>{$r['fname']}</td> <td>{$r['lname']}</td> <td>" . drawImage($r['sign_x'], $r['sign_y']) . "</td>\n"; } function drawImage($xcoords, $ycoords) { $xa = explode(',', $xcoords); $ya = explode(',', $ycoords); $w = max($xa)+10; $h = max($ya)+10; $path = "M $xa[0] $ya[0] "; unset($xa[0], $ya[0]); foreach ($xa as $i => $x) { $y = $ya[$i]; $path .= "L $x $y "; } $im = "<svg width='$w' height='$h' > <path d='$path' stroke='#000' fill='none'/> </svg>"; return $im; } ?> <!DOCTYPE html> <html> <head> <style type="text/css"> table { border-collapse: collapse; width: 60%; } th { background-color: black; color: white; padding: 8px; text-align: left; } td { padding: 4px 8px;; } </style> </head> <body> <table border="1" style="width: 60%;"> <tr><th>ID</th> <th>First name</th> <th>Last name</th> <th>Image</th> <tr> <?=$tdata?> </table> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574426 Share on other sites More sharing options...
Barand Posted February 17, 2020 Share Posted February 17, 2020 4 minutes ago, winuser2003 said: so how would i make that an array from this existing code The same way that the function does in the first two lines function drawImage($xcoords, $ycoords) { $xa = explode(',', $xcoords); // create array from $xcoord string $ya = explode(',', $ycoords); // create array from $ycoord string $w = max($xa)+10; $h = max($ya)+10; $path = "M $xa[0] $ya[0] "; unset($xa[0], $ya[0]); foreach ($xa as $i => $x) { $y = $ya[$i]; $path .= "L $x $y "; } $im = "<svg width='$w' height='$h' > <path d='$path' stroke='#000' fill='none'/> </svg>"; return $im; } example $x = "1, 2, 3, 4, 5"; // comma separated string $arr = explode (', ', $x); // explode into array elements splitting on ", " echo '<pre>', print_r($arr, 1), '</pre>'; // view the array /* result : Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 ) */ Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574428 Share on other sites More sharing options...
winuser2003 Posted February 17, 2020 Author Share Posted February 17, 2020 (edited) I got it to output, looks right... correct me if I am wrong anywhere, but am I going to have to count that thing up to a 1000? HAHA You did this in like a few seconds LOL --- in the earlier post with your signature screenshot. Did you on your end just redo it like this on your side to get that signature to show up? <?php mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); $conn = mysqli_connect("localhost", "winuser2003", "homer123", "pmapptest"); $tdata = ''; $res = $conn->query("SELECT userid, fname, lname, sign_x, sign_y FROM winuser_demo"); foreach ($res as $r) { $tdata .= "<tr><td>{$r['userid']}</td> <td>{$r['fname']}</td> <td>{$r['lname']}</td> <td>" . drawImage($r['sign_x'], $r['sign_y']) . "</td>\n"; } function drawImage($xcoords, $ycoords) { $x = "1, 2, 3, 4, 5"; // comma separated string - Would I have to go to 1000 on this then? $arr = explode (', ', $x); $y = "1, 2, 3, 4, 5"; // comma separated string - Would I have to go to 1000 on this then? $arr = explode (', ', $y); echo '<pre>', print_r($arr, 1), '</pre>'; $w = max($xa)+10; $h = max($ya)+10; $path = "M $xa[0] $ya[0] "; unset($xa[0], $ya[0]); foreach ($xa as $i => $x) { $y = $ya[$i]; $path .= "L $x $y "; } Edited February 17, 2020 by winuser2003 Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574431 Share on other sites More sharing options...
Barand Posted February 17, 2020 Share Posted February 17, 2020 you posted [44, 44, 44, 45, 45, 45, 45, 45, 45, 43, 42, 41, 40, 39, 39, 39, 37, 37, 37, 37, 37, 37, 37, 39, 40, 43, 47, 47, 49, 51, 52, 52, 53, 54, 55, 57, 58, 59, 64, 68, 73, 80, 85, 89, 93, 94, 94, 95, 95, 95, 93, 91, 89, 87, 85, 83, 81, 79, 75, 75, 72, 69, 66, 63, 60, 57, 55, 52, 50, 47, 45, 43, 41, 41, 41, 123, 124, 124, 123, 122, 119, 117, 111, 105, 100, 94, 89, 85, 82, 78, 76, 75, 73, 73, 72, 72, 72, 72, 75, 77, 79, 81, 83, 83, 87, 91, 95, 101, 109, 118, 127, 137, 144, 150, 153, 155, 155, 155, 155, 155, 155, 154, 154, 153, 150, 147, 147, 145, 144, 144, 144, 144, 144, 149, 152, 155, 158, 163, 167, 170, 176, 184, 191, 197, 201, 203, 204, 205, 206, 206, 206, 205, 203, 203, 202, 202, 202, 202, 202, 202, 202, 204, 207, 210, 213, 219, 220, 222, 223, 224, 226, 228, 230, 234, 237, 242, 246, 252, 259, 269, 278, 287, 293, 301, 309, 316, 325, 333, 340, 345, 345, 343, 341, 341, 339, 335, 332, 329, 327, 327, 327, 327, 328, 328, 329, 329, 332, 332, 335, 336, 338, 339, 343, 343, 346, 346] [39, 45, 50, 58, 72, 86, 91, 97, 102, 106, 108, 111, 112, 114, 114, 112, 108, 102, 98, 92, 86, 81, 75, 69, 65, 60, 56, 55, 53, 50, 50, 48, 48, 48, 48, 48, 46, 46, 47, 48, 51, 53, 55, 58, 60, 61, 62, 66, 70, 76, 80, 84, 86, 89, 93, 94, 97, 99, 101, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 72, 72, 71, 69, 68, 65, 64, 62, 61, 61, 61, 61, 61, 61, 62, 64, 64, 66, 68, 71, 76, 81, 86, 92, 94, 96, 100, 102, 102, 104, 104, 104, 104, 104, 101, 98, 94, 91, 86, 84, 80, 78, 76, 74, 73, 72, 71, 70, 69, 71, 75, 76, 82, 86, 92, 95, 98, 102, 105, 108, 108, 110, 111, 111, 111, 110, 106, 102, 98, 94, 91, 88, 84, 82, 79, 77, 74, 71, 70, 68, 68, 66, 66, 65, 64, 63, 62, 62, 59, 58, 57, 57, 56, 56, 56, 56, 58, 58, 60, 61, 63, 64, 66, 68, 68, 68, 68, 68, 65, 63, 59, 55, 51, 50, 47, 47, 48, 50, 51, 52, 55, 57, 58, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 51, 50, 50, 48, 47, 47, 46, 46] I just copy/pasted and changed it to $xx = "44, 44, 44, 45, 45, 45, 45, 45, 45, 43, 42, 41, 40, 39, 39, 39, 37, 37, 37, 37, 37, 37, 37, 39, 40, 43, 47, 47, 49, 51, 52, 52, 53, 54, 55, 57, 58, 59, 64, 68, 73, 80, 85, 89, 93, 94, 94, 95, 95, 95, 93, 91, 89, 87, 85, 83, 81, 79, 75, 75, 72, 69, 66, 63, 60, 57, 55, 52, 50, 47, 45, 43, 41, 41, 41, 123, 124, 124, 123, 122, 119, 117, 111, 105, 100, 94, 89, 85, 82, 78, 76, 75, 73, 73, 72, 72, 72, 72, 75, 77, 79, 81, 83, 83, 87, 91, 95, 101, 109, 118, 127, 137, 144, 150, 153, 155, 155, 155, 155, 155, 155, 154, 154, 153, 150, 147, 147, 145, 144, 144, 144, 144, 144, 149, 152, 155, 158, 163, 167, 170, 176, 184, 191, 197, 201, 203, 204, 205, 206, 206, 206, 205, 203, 203, 202, 202, 202, 202, 202, 202, 202, 204, 207, 210, 213, 219, 220, 222, 223, 224, 226, 228, 230, 234, 237, 242, 246, 252, 259, 269, 278, 287, 293, 301, 309, 316, 325, 333, 340, 345, 345, 343, 341, 341, 339, 335, 332, 329, 327, 327, 327, 327, 328, 328, 329, 329, 332, 332, 335, 336, 338, 339, 343, 343, 346, 346"; $yy = "39, 45, 50, 58, 72, 86, 91, 97, 102, 106, 108, 111, 112, 114, 114, 112, 108, 102, 98, 92, 86, 81, 75, 69, 65, 60, 56, 55, 53, 50, 50, 48, 48, 48, 48, 48, 46, 46, 47, 48, 51, 53, 55, 58, 60, 61, 62, 66, 70, 76, 80, 84, 86, 89, 93, 94, 97, 99, 101, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 72, 72, 71, 69, 68, 65, 64, 62, 61, 61, 61, 61, 61, 61, 62, 64, 64, 66, 68, 71, 76, 81, 86, 92, 94, 96, 100, 102, 102, 104, 104, 104, 104, 104, 101, 98, 94, 91, 86, 84, 80, 78, 76, 74, 73, 72, 71, 70, 69, 71, 75, 76, 82, 86, 92, 95, 98, 102, 105, 108, 108, 110, 111, 111, 111, 110, 106, 102, 98, 94, 91, 88, 84, 82, 79, 77, 74, 71, 70, 68, 68, 66, 66, 65, 64, 63, 62, 62, 59, 58, 57, 57, 56, 56, 56, 56, 58, 58, 60, 61, 63, 64, 66, 68, 68, 68, 68, 68, 65, 63, 59, 55, 51, 50, 47, 47, 48, 50, 51, 52, 55, 57, 58, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 51, 50, 50, 48, 47, 47, 46, 46"; to give me two string variables (as you get from the db table), then echo drawImage($xx, $yy); to get the signature displayed. Why are you changing the function like that? Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574435 Share on other sites More sharing options...
winuser2003 Posted February 17, 2020 Author Share Posted February 17, 2020 sorry about that, right now I am wishing I knew a hell of alot more about plotting this .... I changed the function back to your example. Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574437 Share on other sites More sharing options...
winuser2003 Posted February 17, 2020 Author Share Posted February 17, 2020 this is correct so far right? <?php mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); $conn = mysqli_connect("localhost", "winuser2003", "homer123", "pmapptest"); $tdata = ''; $res = $conn->query("SELECT userid, fname, lname, sign_x, sign_y FROM winuser_demo"); foreach ($res as $r) { $tdata .= "<tr><td>{$r['userid']}</td> <td>{$r['fname']}</td> <td>{$r['lname']}</td> <td>" . drawImage($r['sign_x'], $r['sign_y']) . "</td>\n"; } function drawImage($xcoords, $ycoords) { $xa = explode(',', $xcoords); // create array from $xcoord string $ya = explode(',', $ycoords); // create array from $ycoord string $w = max($xa)+10; $h = max($ya)+10; $path = "M $xa[0] $ya[0] "; unset($xa[0], $ya[0]); foreach ($xa as $i => $x) { $y = $ya[$i]; $path .= "L $x $y "; } $im = "<svg width='$w' height='$h' > <path d='$path' stroke='#000' fill='none'/> </svg>"; return $im; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574439 Share on other sites More sharing options...
Barand Posted February 17, 2020 Share Posted February 17, 2020 I'll try to explain what the function is doing First, in the test data we are trying to achieve this and we are starting with two sets of numbers sign_x - "0,0,100,100,0,50,100,0,100" sign_y - "100,20,20,100,20,0,20,100,100" These numbers need to be put into (x, y) pairs. The first x with first y give (0, 100). The second x with the second y gives (0, 20), the third (100, 20) and so on. By far the easiest way to do this is with indexed arrays so we use explode to put the x and y values into two arrays $xa = Array $ya = Array ( ( [0] => 0 [0] => 100 [1] => 0 [1] => 20 [2] => 100 [2] => 20 [3] => 100 [3] => 100 [4] => 0 [4] => 20 [5] => 50 [5] => 0 [6] => 100 [6] => 20 [7] => 0 [7] => 100 [8] => 100 [8] => 100 ) ) As described inthe above figure, we first want to move to the start point (0, 100) then, after that, we want to draw lines to each successive point. Using SVG (Scalable Vector Graphics) the way to this is to create a path which has a definition of "M 0 100 L 0 20 L 100 20 L 100 100 L 0 20 L 50 0 L 100 20 L 0 100 L 100 100" where M x y means "move to x,y" and L x y means "line to x,y" The function line by line function drawImage($xcoords, $ycoords) { $xa = explode(',', $xcoords); // put x coords string into an array $ya = explode(',', $ycoords); // put x coords string into an array $w = max($xa)+1; // get the max coord values so we know the size $h = max($ya)+1; // define the path $path = "M $xa[0] $ya[0] "; // move to the first x,y position unset($xa[0], $ya[0]); // remove the the first items from the array foreach ($xa as $i => $x) { // loop through arrays $y = $ya[$i]; // pairing the i'th x with the i'th y $path .= "L $x $y "; // define line to x y } // create svg object $w x $h to display image $im = "<svg width='$w' height='$h'> <path d='$path' stroke='#000' stroke-width='1' fill='none'/> </svg>"; return $im; } Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574442 Share on other sites More sharing options...
Barand Posted February 17, 2020 Share Posted February 17, 2020 21 minutes ago, winuser2003 said: this is correct so far right? It doen't output anything but processing looks OK Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574443 Share on other sites More sharing options...
winuser2003 Posted February 18, 2020 Author Share Posted February 18, 2020 15 hours ago, Barand said: $xa = Array $ya = Array ( ( [0] => 0 [0] => 100 [1] => 0 [1] => 20 [2] => 100 [2] => 20 [3] => 100 [3] => 100 [4] => 0 [4] => 20 [5] => 50 [5] => 0 [6] => 100 [6] => 20 [7] => 0 [7] => 100 [8] => 100 [8] => 100 ) ) if I am defining these, would that cause a problem though? I mean we may have quite a bit of signatures, and if I am defining a set of X and Y points won't they be all the same? example, I gave you the X and Y coordinates of a signatre and you were able to see the output which is what I expected. Lets say I give you another set of XY coordinates based on be defining the array, are they still going to be the same? or is the array going to say from this X point and to this Y point I will plot this image based on these newly submitted coordinates. Hope that makes sense. Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574493 Share on other sites More sharing options...
winuser2003 Posted February 18, 2020 Author Share Posted February 18, 2020 not sure how I did this... but I changed a couple items in the DB entry and this happen... Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574497 Share on other sites More sharing options...
winuser2003 Posted February 18, 2020 Author Share Posted February 18, 2020 Upon closer analysis it seems there is a bracket in the XY coordinates which is why it was not working originally on my end... [44, 44, 44, 45, 45, 45, 45, 45, 45, 43, 42, 41, 40, 39, 39, 39, 37, 37, 37, 37, 37, 37, 37, 39, 40, 43, 47, 47, 49, 51, 52, 52, 53, 54, 55, 57, 58, 59, 64, 68, 73, 80, 85, 89, 93, 94, 94, 95, 95, 95, 93, 91, 89, 87, 85, 83, 81, 79, 75, 75, 72, 69, 66, 63, 60, 57, 55, 52, 50, 47, 45, 43, 41, 41, 41, 123, 124, 124, 123, 122, 119, 117, 111, 105, 100, 94, 89, 85, 82, 78, 76, 75, 73, 73, 72, 72, 72, 72, 75, 77, 79, 81, 83, 83, 87, 91, 95, 101, 109, 118, 127, 137, 144, 150, 153, 155, 155, 155, 155, 155, 155, 154, 154, 153, 150, 147, 147, 145, 144, 144, 144, 144, 144, 149, 152, 155, 158, 163, 167, 170, 176, 184, 191, 197, 201, 203, 204, 205, 206, 206, 206, 205, 203, 203, 202, 202, 202, 202, 202, 202, 202, 204, 207, 210, 213, 219, 220, 222, 223, 224, 226, 228, 230, 234, 237, 242, 246, 252, 259, 269, 278, 287, 293, 301, 309, 316, 325, 333, 340, 345, 345, 343, 341, 341, 339, 335, 332, 329, 327, 327, 327, 327, 328, 328, 329, 329, 332, 332, 335, 336, 338, 339, 343, 343, 346, 346] Once i removed these brackets from the beginning and end the image showed up fine. I am not sure if we can do anything about that though... Does this just mean its being sent as an array rather than a string? Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574499 Share on other sites More sharing options...
Barand Posted February 18, 2020 Share Posted February 18, 2020 1 hour ago, winuser2003 said: Does this just mean its being sent as an array rather than a string? It's a json array. Try this version of the "drawImage" function with your db table function drawImage($xcoords, $ycoords) { $xa = $xcoords[0]=='[' ? json_decode($xcoords, 1) : explode(',', $xcoords); // put x coords into an array $ya = $ycoords[0]=='[' ? json_decode($ycoords, 1) : explode(',', $ycoords); // put x coords into an array $w = max($xa)+1; // get the max coord values so we know the size $h = max($ya)+1; // define the path $path = "M $xa[0] $ya[0] "; // move to the first x,y position unset($xa[0], $ya[0]); // remove the the first items from the array foreach ($xa as $i => $x) { // loop through arrays $y = $ya[$i]; // pairing the ith x with the ith y $path .= "L $x $y "; // define line to x y } // create svg object $w x $h to display image $im = "<svg width='$w' height='$h'> <path d='$path' stroke='#000' stroke-width='2' fill='none'/> </svg>"; return $im; } Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574503 Share on other sites More sharing options...
winuser2003 Posted February 18, 2020 Author Share Posted February 18, 2020 Result : Coordinates Used : X Coordinate: 61, 62, 64, 66, 73, 79, 84, 92, 100, 107, 112, 118, 121, 122, 123, 123, 123, 123, 123, 123, 121, 118, 114, 110, 108, 105, 103, 102, 99, 96, 92, 88, 86, 83, 80, 75, 69, 64, 58, 52, 47, 44, 40, 36, 34, 32, 30, 29, 29, 29, 29, 29, 31, 32, 36, 40, 45, 49, 56, 62, 70, 79, 85, 90, 96, 101, 104, 105, 108, 108, 109, 109, 109, 109, 109, 108, 105, 100, 95, 91, 88, 85, 82, 80, 77, 76, 72, 70, 67, 64, 61, 58, 57, 56, 56, 56, 56, 56, 56, 58, 61, 62, 64, 65, 68, 71, 76, 82, 89, 94, 100, 109, 117, 123, 127, 129, 130, 130, 130, 130, 128, 127, 125, 125, 125, 124, 124, 125, 127, 129, 132, 134, 135, 137, 137, 137, 137, 136, 134, 129, 126, 121, 116, 110, 106, 103, 102, 101, 98, 97, 97, 97, 102, 107, 115, 125, 135, 144, 152, 159, 168, 174, 182, 192, 202, 212, 223, 231, 239, 242, 243, 240, 231, 218, 206, 199, 190, 184, 181, 180, 180, 181, 187, 194, 206, 215, 222, 226, 227, 227, 224, 220, 215, 209, 203, 195, 190, 189, 192, 195, 199, 200, 204, 205, 207, 208, 203, 200, 198, 197, 196, 196, 197, 200, 201, 203, 207, 208, 210, 211, 214, 215, 214, 213, 211, 210, 209, 207, 204, 200, 196, 193, 189, 188, 187, 187, 187, 188, 189, 192, 194, 196, 200, 207, 217, 228, 239, 249, 260, 272, 276, 280, 282, 282, 339, 339, 338, 337, 334, 330, 325, 315, 306, 297, 289, 284, 279, 276, 275, 273, 273, 273, 275, 279, 282, 288, 294, 302, 310, 319, 328, 337, 348, 355, 359, 362, 363, 365, 366, 368, 369, 369 Y Coordinate: 56, 57, 57, 58, 58, 58, 58, 58, 58, 57, 55, 52, 51, 49, 47, 46, 43, 40, 37, 33, 28, 24, 20, 17, 15, 13, 13, 13, 13, 13, 14, 17, 19, 22, 26, 31, 36, 41, 46, 50, 54, 56, 59, 63, 64, 67, 71, 73, 76, 79, 81, 84, 86, 87, 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, 89, 87, 87, 87, 85, 84, 83, 80, 77, 76, 74, 71, 67, 64, 62, 62, 62, 62, 62, 62, 64, 64, 68, 70, 74, 78, 83, 89, 95, 101, 108, 114, 119, 123, 126, 128, 132, 133, 134, 135, 135, 135, 135, 133, 129, 125, 118, 112, 106, 99, 93, 86, 79, 74, 68, 65, 60, 58, 55, 54, 53, 52, 51, 52, 57, 60, 65, 71, 79, 88, 96, 104, 111, 117, 122, 127, 131, 136, 140, 143, 144, 144, 144, 144, 141, 138, 130, 121, 110, 97, 85, 74, 63, 55, 49, 42, 38, 37, 36, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 37, 39, 43, 44, 45, 45, 46, 46, 46, 46, 46, 44, 44, 43, 43, 44, 48, 52, 57, 64, 69, 75, 79, 80, 80, 78, 74, 72, 69, 67, 66, 66, 71, 74, 78, 81, 82, 83, 83, 83, 83, 81, 79, 78, 76, 76, 74, 73, 76, 77, 80, 81, 84, 88, 92, 97, 102, 109, 116, 123, 128, 133, 135, 138, 139, 139, 139, 139, 139, 135, 129, 124, 117, 110, 103, 94, 90, 86, 84, 84, 51, 50, 50, 50, 50, 53, 57, 63, 70, 77, 85, 91, 98, 105, 111, 118, 124, 130, 135, 139, 142, 145, 146, 146, 146, 144, 139, 133, 123, 116, 107, 100, 93, 87, 81, 78, 76, 76 Why are the brackets making a difference though? I appreciate you teaching me along this project... learning quite a bit. Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574504 Share on other sites More sharing options...
Barand Posted February 18, 2020 Share Posted February 18, 2020 1 minute ago, winuser2003 said: Why are the brackets making a difference They affect the way the data has to be processed. Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574506 Share on other sites More sharing options...
winuser2003 Posted February 18, 2020 Author Share Posted February 18, 2020 so will I still need to create an array? is this still recommended? Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574508 Share on other sites More sharing options...
winuser2003 Posted February 18, 2020 Author Share Posted February 18, 2020 so he and I are testing it, and its pretty much right on now... what do you think? Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574509 Share on other sites More sharing options...
Barand Posted February 18, 2020 Share Posted February 18, 2020 You just need to pass the data from the sign_x and sign_y columns in your table to the drawImage() function. In prictice, how do you want to use the function. Will you be producing lists of names and signatures?, or querying the database for an individual signature? Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574510 Share on other sites More sharing options...
Barand Posted February 18, 2020 Share Posted February 18, 2020 8 minutes ago, winuser2003 said: so he and I are testing it, and its pretty much right on now... what do you think? Are those two signatures in your image produced by different methods? Quote Link to comment https://forums.phpfreaks.com/topic/310043-confused-about-graphing-coordinates/page/2/#findComment-1574511 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.