Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 06/26/2024 in all areas

  1. Which field in Charters identifies the driver in question? SELECT chtr.id, chtr.charter_name, chtr.fleet_number, chtr.driver, chtr.customer_name, chtr.customer_number, chtr.dep_date, chtr.status /* \/ \____/ Which of these is the id into the users table? */ , usr.id, usr.fname FROM charters AS chtr LEFT JOIN users AS usr ON chtr.id = usr.id /* \/ Should this, perhaps, be chtr.driver? */ I would expect every table to have its own, unique id field and those ids are completely independent of one another (by which I mean Charter .id=6 is a completely different thing to Users .id=6). Regards, Phill W.
    1 point
  2. This seems very relevant to your budget, as well as your locale and the types of sites you have as well as the primary audience for those sites. This is a list of the largest and best known companies (outside of maybe godaddy): https://www.forbes.com/advisor/l/best-cheap-web-hosting
    1 point
  3. The assignment operator is "=", not "==". Instead of the for() loop, why not just use in_array() as I did? function GetColour($Balls,$Ball) { return in_array($Ball, $Balls) ? "#0000ff" : "#c53ba1"; }
    1 point
  4. Your function is ony interested in the latest draw so why query for every draw since 2004, just LIMIT the query to the 1 row you need instead of fetchong all then discarding the 2,079 that are surplus to requirements. The speed of a query is proportional to the amount of data returned so keep it to the minimum required columns and rows. SELECT N1 FROM EuroMillions ORDER BY Draw DESC LIMIT 1;
    1 point
  5. What does the fetch() function return? I think you need something more like this: $row = $stmt -> fetch(); echo( $row[ 'N1' ] ); Also, avoid using "select *" in Application code. Whilst you might not have a lot of columns in that table [yet], databases are inherently shared entities and you never know when someone [else] might add a dozen columns full of gigabytes of stuff that this query simply doesn't care about. Always select just the columns that you specifically need. Regards, Phill W.
    1 point
  6. If you "fixed it" but it doesn't work then you didn't fix it. That input type=file can work, I would think, however it will require changing some number of other things - I can't say exactly what since it's complicated and it will depend a lot on other things (which you haven't shown) but it can work. Either that, or go back to what you had before and do what I originally said about using Javascript to prevent the form from being submitted. Again, I can't say exactly how since it depends on things you haven't posted, but the principle is very simple: when the form is being/is about to be submitted, check that there is a value for that cover "file", and if not then stop the form from submitting and tell the user they missed a step.
    1 point
  7. Hi. Not much into contact forms myself but just did a quick google. 6 years old but might give you ideas: https://github.com/SH1R3F/Contact-Form---PHP-OOP
    1 point
  8. If you've fixed it then you don't need Javascript...
    1 point
  9. Hidden inputs can't be required. They're hidden. The user can't do anything with them. Assuming you have some sort of Javascript to read a file and put its contents into that input, which is weird because it's reinventing the wheel, then use more Javascript to prevent the user from submitting the form until they've chosen the file.
    1 point
  10. Set your old timestamp variable to null when the game is started/restarted. this.oldTimeStamp = null; Then in your game loop function, check if it's null and if so store the provided timestamp. if (this.oldTimeStamp===null){ this.oldTimeStamp=timeStamp; } This way your game always starts out at 0 for seconds passed. Currently, your first iteration when the page loads is essentially random as it depends on how long it takes for the browser to run the first game loop after starting the page.
    1 point
  11. here's a note about AddPage(), which does the same as the <pagebreak> tag - apparently WriteHtml() adds the first page at the beginning of a new document, so the specific <pagebreak> adds a second one.
    1 point
  12. as far as i can tell, mpdf doesn't support writing-mode or text-orientation - https://mpdf.github.io/css-stylesheets/supported-css.html the only reason you have a case where the letters are vertical is because there's only horizontal space in the layout for a single letter at that point. i recommend that you just add a <br> tag between each letter using code.
    1 point
  13. When it encounters the "<p>" it is still in the php section of the code and the "<p>" isn't valid php code. You need to exit from php before you enter the html. Move the "?>" line ...
    1 point
  14. Perhaps the PHP isn't working because there isn't any PHP code in there
    0 points
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.