Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by MPM

  1. You can't just paste the example code in as they are using different variable names to you. You have to learn the principles and then apply them. The steps are: connect (you do) select the data from the table (you did int he first example) extract a row from that data (as mentioned no need for a loop for the first test just get one row) extract a single item from that array echo that item Or replace 4 and 5 with a print_r of the array.
  2. Make sure you have error reporting turned on as you should be seeing errors with that code.
  3. Screen shots of what is happening maybe Chris? Back in the day you could ask Google and other search engines not to spider a site or certain parts of it. I don't know if that still works. Search for help on how to use robots.txt
  4. I don't know the calendar API - have you researched the correct format for the URL? Then it is just a case of reproducing a URL from the data you have in variables which is the sort of thing we all do regularly and could help with.
  5. Mac's point is still valid though. You do not need to store whether someone is a member. You just query the current date against their/the membership date when you need to know. It is trivial that way and MUCH more useful and flexible. It allows you to later add queries for automated reminders as memberships dates come closer and more. It is one of the fundamental principles of database design rather than a programming issue.
  6. I for one still have no idea what you are talking about. I did notice that this: if ($dateTime = new DateTime('2019-07-19')) will always be true as there is only one equals so it assigns the new date (which seems fair) so why is it an if? A general tip is to try to use SQL for dates as it is much easier.
  7. As Barand suggests it looks like you are trying to get a file from a local system to a database. If that database is remote you will need to get the file to the server (probably using an HTML form).
  8. I know it was suggested but perhaps not as clearly as the OP needed so I thought I'd explicitly state it despite the fact they should have done it ages ago. Apparently the OP doesn't feel it was helpful from me either:-(
  9. What happens if you change what you posted on Sunday so the line shown here becomes the amedned code below: $stream1 = $_POST['streamId']; $stream1 = "test data; Load connUpdate.php directly in the browser.
  10. The challenge with PHP is that you need to understand HTML, PHP and SQL to get anythign useful done and if you are shaky on any of that it is hell to track down problems. Your HTML is shaky and that suggests you might need some more time on that before you move on but having said that your code looks fine apart from the issue already mentioned by Barand. It should work once you remove the if statement. If you want to have another go here is a page I wrote on the subject for 16 year olds. The site was written to be followed start to end but I think the page makes sense on it's own (especially if you follow the link to the place I explained how to create a form. https://www.yourwebskills.com/page.php?page=124
  • 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.