Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/28/2023 in all areas

  1. I don't know what you're asking or how to answer it either, but I can definitely confirm that the code you posted doesn't make any sense whatsoever and there is no reason it needs to exist.
    1 point
  2. Huh? What is 'mountain safe' or 'mountain good'? Never heard of those terms on a forum. As for the ar function: What's the point? You have a $_POST array already so why do you need to make a new array? And then you create the em function just to find out if a value is empty. Why does one need a function for that when PHP gives the empty function to use already? And your bh function. Not at all sure what you are trying to do but what you have is going to simply create a single element array (?) with a key and a value that you already know and that you could have put into an array on your own. This function doesn't do anything. And it also creates an extra array just so you can return it. Why? And the bb function. I won't even discuss that one. Nor the commented code.
    1 point
  3. One thing I don't think was mentioned is to be wary of smart / curly quotes. I'm guessing those are remnants from copying code from a blog post. Be aware that PHP requires straight quotes. The following, for example, ‘expected-timeline-for-buying’ should be 'expected-timeline-for-buying'
    1 point
  4. Maybe something like this for variable naming and form field names? $fullName = filter_input(INPUT_POST, 'fullName'); $phone = filter_input(INPUT_POST, 'phone'); $email = filter_input(INPUT_POST, 'email'); $propertyType = filter_input(INPUT_POST, 'propertyType'); $address = filter_input(INPUT_POST, 'address'); $priceRange = filter_input(INPUT_POST, 'priceRange'); $bedrooms = filter_input(INPUT_POST, 'bedrooms'); $bathrooms = filter_input(INPUT_POST, 'bathrooms'); $preApproved = filter_input(INPUT_POST, 'preApproved'); if ($preApproved === "yes") { echo $preApprovalAmount; } $parkingType = filter_input(INPUT_POST, 'parkingType'); $buyingTimeline = filter_input(INPUT_POST, 'buyingTimeline'); $exploreZips = filter_input(INPUT_POST, 'exploreZips'); $dreamHomeWish = filter_input(INPUT_POST, 'dreamHomeWish');
    1 point
  5. You are using brackets to wrap your function args. Use parens. And - I would not use dashes for varnames. Use underscores. And - A comparison (in an if) uses 2 = signs, not just one. And - you are going to get real tired of re-typing var names that are way too long pretty quickly. I know you are trying to be clear but perhaps you could re-think your names to make it easier to type them and read them later on.
    1 point
This leaderboard is set to New York/GMT-05: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.