Assume there is no one doing type as you search.
And I am the first one to do it, can I patent this application? If not, please explain. Thank you.
The more interesting question is: even if you could, why would you patent it?
Patents are worthless for most startups. They are expensive, and you don't have the resources to enforce them.
Unless your business model is based on a single technology innovation, you are better off spending your time and money on finding product-market fit. Imagine the irony of having a patent on something nobody wants.
Is it novel?
Is it useful?
Is it non-obvious?
These are the three fundamental questions for patentability. Software involves more complex issues, however, so I'd recommend reading up on the Bilski Supreme Court ruling.
The problem you would run into is that PHP and JavaScript are just coding languages, and you can't really patent them.
You could, however, copyright the ultimate execution of your code/design, meaning that somebody wouldn't legally be able host a site that looked and functioned exactly as yours did. The problem is, there's really no way to tell if somebody copied your source and then modified it.
Imagine if Yahoo were able to patent search technology. We wouldn't have Google, and websites would have to pay to implement search indexes on their own internal sites.
The good thing is that all of this promotes competition and moves the web further forward in its evolution. I, personally, wouldn't have it any other way and I'm praying for the day that they ban patents on pharma.
Ultimately, you can't really patent/copyright the technology, because the technology you're using doesn't belong to you. If it has been published as free software, which I believe PHP has, then it is considered in the public domain, though the PHP name is trademarked.The JavaScript trademark, I believe, is owned by Oracle Corporation.
Since you don't own the technology, you can't really patent it.
You can patent any idea but it much the first idea. use http://patents.google.com to make a patent search and find whether anyone before patented the same idea. Of course you may think you are the first but you will never know what the person besides you is thinking about. So, first make a search and then you can submit it for patents.
The one step answer for your question is you can patent any kind of idea.
But I am not sure that I understood your question :(