Jump to content

requinix

Administrators
  • Content Count

    11,073
  • Joined

  • Last visited

  • Days Won

    210

Posts posted by requinix


  1. 18 minutes ago, montilla said:

    But why locally does the project work perfectly?

    :psychic:

    Your local and production environments are not the same. Compare and contrast.

    18 minutes ago, montilla said:

    Whoever takes care of the routes is my Route.php, right?

    Your PHP isn't being executed in the first place. That's the problem. The web server (Apache) has to know that it needs to execute your PHP. If it does not then you'll get those 404s.


  2. Parse each line with a regular expression. According to that log, it looks like

    ([\d.]+) (\S+) (\S+) \[([^\]]+)\] "([^"]+)" (\d+) (\d+) "([^"]+)" "([^"]+)"
    1. Remote IP address
    2. Likely a hyphen
    3. HTTP Basic username if given
    4. Date/time
    5. Request URI
    6. HTTP response code
    7. Response length
    8. HTTP Referer if present
    9. HTTP User-Agent if present

  3. There are two basic ways you approach this: either you have the subform as a "template" in your Javascript and you keep adding copies of it as needed, or you use AJAX to load a new subform from the server.

    Which makes more sense to you?


  4. Have you learned how the filters work yet? They can be very complicated. You will need them to be a little complicated in order to do this with one command. If you don't then you'll need more code and commands, like to resize images or identify video dimensions.


  5. 36 minutes ago, glendango said:

    interesting.   so do you think they use Ajax to get the locations from a database or would it be an API....   

    AJAX is a way for the browser to get something from the server without having to refresh the page. An API is merely what tells two things how to talk to each other.

    Since they won't want to put every location onto the page (probably), yes: they will use AJAX to ask the server for a list of locations matching what the user types.

    Quote

    once a user selects  e.g.  Islington, London    .

    does this then add that as a $variable to a select statement to the database to create a list of properties on the next page ? 

    $location = islington

    select * from table where $location 

    Something like that.


  6. 1 hour ago, glendango said:

    1) They allow the user to search by county / postcode / town.  How is this list populated in the drop down?  is it a list of towns  in a plugin  which are then used as variables to populate the mysql select query,, or is it ajax populating the search input with a call to the db...

    Reason iam confused it i know of a site with no property in a certain area but the list still predicts the area ...i.e. if no matching address is in the db how is it populating?  

    They have a big database of locations. Probably purchased from and/or subscribed to a service that tracks stuff like that so they don't have to try to stay up to date themselves.

    Quote

    2)  they also have a search function that once the user has arrived on the page by postcode..users are able to search 1/4 mile 1/2 mile radius etc from the  postcode for other properties...   how is this working?  

    They know the latitude and longitude of an address, also probably from a third-party service (eg, Google Maps). A postcode has a location too, though it's obviously not quite as precise. Then they can do some pretty simple math to estimate the distance between the two points.

    • Like 1

  7. Before that, you know you're wrapping each input in its own form, right? Separately?

    You're creating the inputs and forms dynamically. Add an event listener to the form you make so that when it's (attempted to be) submitted that it checks the input against the item in the array. The only awkwardness is the array variable being reused so you can't use it in a closure, so instead of that try Array.map() like

    a.map(function(value, key) {
    	// ...
    });

     

×

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.