-
Posts
266 -
Joined
-
Last visited
-
Days Won
5
Everything posted by dodgeitorelse3
-
Give Image to HTML through PHP-doesn't work
dodgeitorelse3 replied to mr_bob's topic in PHP Coding Help
A web server typically uses port 80 so what do you get without the :5500 in address? -
PHP Need nested user array values to dump into html table cell
dodgeitorelse3 replied to Thomas_L's topic in PHP Coding Help
missing closing square bracket at end of Json Format -
Best browser with the best tools for PHP development?
dodgeitorelse3 replied to sen5241b's topic in PHP Coding Help
in Firefox Developer menu bar choose Tools/Web Developer or right click on an element on web page and choose inspect element -
My apologies. I didn't see the commented out lines.
-
You have a button with type= button as well as type= submit and name of remove and at sane time you have an input with type=submit and name=remove.
-
What does title.php look like?
-
PHP Code breaks if any DB stuff is attempted
dodgeitorelse3 replied to X0ML's topic in PHP Coding Help
pg_connect from manual https://www.php.net/manual/en/function.pg-connect.php -
Have you tried to echo query to verify what it is using for login credentials?
-
I think you are going to want to run your if/else statement on your results instead of in your query.
-
how to use the values get in AJAX method in sql query?
dodgeitorelse3 replied to sashavalentina's topic in PHP Coding Help
Also with chart.js all arrays used for chart must have exact same number of items in each array. -
is the filename from files table stored with file extension?
-
Using nl2br() function inside while and echo
dodgeitorelse3 replied to Fishcakes's topic in PHP Coding Help
check your semi colons ( ; ) -
Show what you have tried so far please
-
OP is most likely after rows 11 through 20 (after last 10)
-
Changing timestamp date format in table display
dodgeitorelse3 replied to OzWaz2's topic in PHP Coding Help
@OP, you have a comma before name in your query -
Cannot get second yAxes to scale by right side 0-1
dodgeitorelse3 replied to dodgeitorelse3's topic in Javascript Help
var labelsdb = <?php echo json_encode($labelsdb); ?>; //array from database for dates and times var datadb = <?php echo json_encode($datadb); ?>; // array from database for number of players var datadon = <?php echo json_encode($datadon); ?>; // array from database for number of players var datadoff = <?php echo json_encode($datadoff); ?>; // array from database for number of players var ctx = document.getElementById("myChart"); // points to canvas ctx.style.backgroundColor = "#2F3136"; //canvas background color var myChart = new Chart(ctx, { type: 'line', data: { labels: labelsdb, datasets: [{ label: 'Players', yAxisID: 'A', backgroundColor: '#593A45', // color for active players bars in graph borderWidth: 1, // border for active players bars in graph borderColor: '#F45E7F', steppedLine: true, //true keeps even line horizontal until change, false displays curved line data: datadb }, { label: 'Online', yAxisID: 'B', backgroundColor: '#808080', // color for active players bars in graph borderWidth: 1, // border for active players bars in graph borderColor: '#CECECE', steppedLine: true, //true keeps even line horizontal until change, false displays curved line data: datadon }] }, options: { responsive: true, //whether graph is responsive when zoom in or out maintainAspectRatio: false, scales: { xAxes: [{ scaleLabel: { display: true, fontColor: '#FFFFFF', fontStyle: 'bold', fontSize: 14 }, ticks: { autoSkip: false, maxTicksLimit: 24, maxRotation: 45, //rotate text for hours at bottom of graph minRotation: 45, //rotate text for hours at bottom of graph fontColor: '#FFFFFF', // color of hours at bottom of graph major: { enabled: true, // <-- This is the key line fontStyle: 'bold', //You can also style these values differently fontSize: 14 //You can also style these values differently } }, type: 'time', //to show time at bottom of graph time: { unit: 'hour', displayFormats: { hour: 'hA', //example displays 9AM or 6PM stepSize: 1 //1 for each hour to display at bottom of graph, 2 to show every 2 hrs. } }, display: true, gridLines: { display: true, // display vertical gridline color: '#686868', //color of vertical gridlines zeroLineColor: '#686868' //colors first vertical grid line } }], yAxes: [{ id: 'A', type: 'linear', position: 'left', ticks: { fontColor: '#FFFFFF', // color of numbers at left side of graph for number of players stepSize: 1 }, gridLines: { display: true, //display horizontal gridlines color: "#686868" //color of horizontal gridlines }, scaleLabel: { display: true, //display label at left vertical side of graph labelString: 'Players', //text to be displayed at left vertical side of graph fontColor: '#FFFFFF', fontStyle: 'bold', fontSize: 14, } }, { id: 'B', type: 'linear', position: 'right', ticks: { max: 1, min: 0, stepSize: 1, fontColor: '#808080', fontStyle: 'bold', fontSize: 14 }, gridLines: { display: true, //display horizontal gridlines color: "#686868" //color of horizontal gridlines }, scaleLabel: { display: true, labelString: 'Online', fontColor: '#808080', fontStyle: 'bold', fontSize: 14 } }] } } }); Solved!! -
Cannot get second yAxes to scale by right side 0-1
dodgeitorelse3 replied to dodgeitorelse3's topic in Javascript Help
this is using chartjs -
I have this code. The players works and scales to the left side 0-23 but online scales to left side 0-23 instead of right side 0-1. What am I doing wrong? //arrays used in javascript //$labelsdb = array('2018-12-20 00:11', '2018-12-20 00:37', '2018-12-20 00:43', '2018-12-20 03:15', '2018-12-20 03:42', '2018-12-20 03:56', '2018-12-20 04:17', '2018-12-20 04:33', '2018-12-20 07:23', '2018-12-20 10:00', '2018-12-20 12:23', '2018-12-20 14:00', '2018-12-20 18:42', '2018-12-20 19:17', '2018-12-20 23:53'); //$datadb = array(2,12,2,7,23,5,8,2,0,4,0,8,1,0,3); //$datadon = array(1,0,1,1,1,1,1,0,1,1,0,1,1,0,1); //$datadoff = array(0,1,0,0,0,0,0,1,0,0,1,0,0,1,0); var labelsdb = <?php echo json_encode($labelsdb); ?>; //array from database for dates and times var datadb = <?php echo json_encode($datadb); ?>; // array from database for number of players var datadon = <?php echo json_encode($datadon); ?>; // array from database for number of players var datadoff = <?php echo json_encode($datadoff); ?>; // array from database for number of players var todays_date = "20Dec2018"; // todays date //var ctx = document.getElementById("myChart").getContext('2d'); // points to canvas var ctx = document.getElementById("myChart"); // points to canvas ctx.style.backgroundColor = "#2F3136"; //canvas background color var myChart = new Chart(ctx, { type: 'line', data: { labels: labelsdb, //data from database for dates and times datasets: [{ backgroundColor: '#593A45', // color for active players bars in graph label: 'Players', // label for legend yAxisId: 'y-axis-players', data: datadb, //data from database for number of players borderWidth: 1, // border for active players bars in graph borderColor: '#F45E7F', steppedLine: true, //true keeps even line horizontal until change, false displays curved line }, { yAxisId: 'y-axis-online', backgroundColor: '#E5E5E5', // color for active players bars in graph label: 'Online', // label for legend data: datadon, //data from database for number of players borderWidth: 1, // border for active players bars in graph borderColor: '#CECECE', steppedLine: true, //true keeps even line horizontal until change, false displays curved line },] }, options: { responsive: true, //wheteher graph is responsive when zoom in or out maintainAspectRatio: false, legend: { labels: { fontColor: '#FFFFFF' // color of legend label } }, scales: { xAxes: [{ scaleLabel: { display: true, //labelString: updated, //displays date at very bottom of graph fontColor: '#FFFFFF', fontStyle: 'bold', fontSize: 14, }, ticks: { autoSkip: false, maxTicksLimit: 24, maxRotation: 45, //rotate text for hours at bottom of graph minRotation: 45, //rotate text for hours at bottom of graph fontColor: '#FFFFFF', // color of hours at bottom of graph major: { enabled: true, // <-- This is the key line fontStyle: 'bold', //You can also style these values differently fontSize: 14 //You can also style these values differently } }, type: 'time', //to show time at bottom of graph time: { unit: 'hour', displayFormats: { hour: 'hA', //example displays 9AM or 6PM stepSize: 1 //1 for each hour to display at bottom of graph, 2 to show every 2 hrs. } }, display: true, gridLines: { display: true, // display vertical gridline color: '#686868', //color of vertical gridlines zeroLineColor: '#686868' //colors first vertical grid line } }], yAxes: [{ scaleLabel: { display: true, //display label at left vertical side of graph labelString: 'Players', //text to be displayed at left vertical side of graph fontColor: '#FFFFFF', fontStyle: 'bold', fontSize: 14, position: 'left', id: 'y-axis-players', }, ticks: { fontColor: '#FFFFFF', // color of numbers at left side of graph for number of players stepSize: 1 // 1 is to display 0, 1, 2, 3 or 2 will display 0, 2, 4, 6 }, gridLines: { display: true, //display horizontal gridlines color: "#686868" //color of horizontal gridlines } },{ scaleLabel: { display: true, labelString: 'Online', fontColor: '#E5E5E5', fontStyle: 'bold', fontSize: 14 }, position: 'right', id: 'y-axis-online', //type: 'linear', ticks: { min: 0, beginAtZero: true, stepSize: 1, max: 1, fontColor: '#E5E5E5', fontStyle: 'bold', fontSize: 14 }, ticks: { fontColor: '#FFFFFF', // color of numbers at right side of graph for online stepSize: 1 }, gridLines: { display: true, //display horizontal gridlines color: "#686868" //color of horizontal gridlines } }], } } });
-
Video player issue player dont work on every browser vbulletin 4
dodgeitorelse3 replied to kerd's topic in PHP Coding Help
🥴 -
Did you bother to test the 2 suggestions?
-
Php PDO query issue for navigation and content from MySQL db
dodgeitorelse3 replied to Skorpio's topic in PHP Coding Help
Very very hard to see the returned array