Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. try checking the response with the rest of your post data: if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['phone']) || empty($_POST['message']) || !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) || $_POST['g-recaptcha-response'] === false){ //<<<--- API Docs state that the reCaptcha populates an HTML POST value with it's response ... }
  2. what have you tried? What do you get if you change the following LEFT join to an INNER join? Also, there is a spurious closing parenthesis ) in the WHERE clause that could be causing an issue. You should wrap all complex conditions inside parenthesis to ensure that the clause is checked accurately FROM dbo.CWAnnouncements Left JOIN dbo.NotificationArchive ON dbo.CWAnnouncements.AnnouncementID=dbo.NotificationArchive.AnnouncementID WHERE (dbo.NotificationArchive.UserID='#GetAuthUser()#' AND dbo.CWAnnouncements.Active=1 AND dbo.NotificationArchive.UserID IS NULL) OR dbo.CWAnnouncements.UserID='#GetAuthUser()#' AND dbo.NotificationArchive.UserID='#GetAuthUser()#' AND dbo.CWAnnouncements.Active=1 AND dbo.NotificationArchive.Active = 1 )
  3. Without knowing anything about the server or it's connection to the clients, or the number of clients you ware targeting it's impossible to resonable deductions to the effect that your application would have on said server. So moving on to the rest of the question, you want to look into AJAX long polling if you are planing on doing this with just PHP and javascript. However, there is a better way. There are a couple of frameworks out there, Node.js being one of the biggest, that will facilitate server push without having to constantly poll the server from every client. I recomend taking the time to aquaint yourself with Node.js before making any decissions regarding how you plan to tackle this.
  4. I agree, I don't think "what's the best" is an accurate question when it comes to code editors/IDE's. What is a feature to one group can be a pain in the backside for another. I don't think that there is a universal right answer, although there may be, I have used a pitiful number of applications to code in. I do like it simple myself, and have been prone to using PSPad for a number of yeas now. I drifted into using eclipse for a little while, but setting up workspaces and projects was too much of a pain in the backside after a while and I just gave up. I also couldn't be bothered with the load up time of starting eclipse every time I wanted to go in and do a bit of coding. I have just recently started using an IDE/editor called CodeLobster, and I have to say, I'm quite liking it. It doesn't suffer from PSpads single most infuriating habit of auto closing absolutely everything as soon as you open it. i.e. you type a double quote and instantly you have two on the page, one in front of the cursor, and one behind. It drives me nuts. Code Lobster also has an integrated debugger - which I haven't trued yet, but if you set up your webroot it lets you preview pages in a single click, without having to change window and hit f5. Like other environments it lets you change the color theme in as few as 4 clicks (choices include all the popular editors), offering a preview of how each theme looks on each type of code (CSS/PHP/HTML/etc.). All in, it's shaping up to be a pretty polished bit of software. The basic version is free with the option to spend a nominal amount to upgrade to lite or a bit more to get pro. I was going to go into the differences but read through it and it looked like a rather shameless advert, so I deleted it and I'll leave it there.
  5. it's common to stick with one direction of join, and left is the most popular, so you would normaly code a query to use only left joins (and any inner / cross joins that were also required) using the layout that kicken explained.
×
×
  • 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.