Jump to content

maxxd

Gurus
  • Content Count

    811
  • Joined

  • Last visited

  • Days Won

    20

maxxd last won the day on August 5

maxxd had the most liked content!

Community Reputation

56 Excellent

About maxxd

  • Rank
    Prolific Member

Contact Methods

  • Website URL
    https://maxxwv.com

Profile Information

  • Gender
    Not Telling
  • Location
    North Carolina

Recent Profile Visitors

12,189 profile views
  1. maxxd

    classes, interfaces and methods

    There's that, too - plus I've been trying to bone up on my ESNext skills over the past month or so, so that's kinda where my head is right now.
  2. maxxd

    classes, interfaces and methods

    Yeah, it's correct but somehow it feels like JavaScript - it's probably because I forgot you don't use dollar signs on constants...
  3. maxxd

    classes, interfaces and methods

    Why are you stumped? You're not calling the methods. @Barand beat me to it, but here's another take on what he is saying. interface animal{ public function walk(); public function fly(); public function swim(); } class Cat implements animal{ public function walk(){ echo "Cat can walk"; } public function fly(){ echo "Cat no fly"; } public function swim(){ echo "Cat no like"; } } class Dog implements animal{ public function walk(){ echo "Dog loves walk!"; } public function fly(){ echo "Dog doesn't fly..."; } public function swim(){ echo "Dog LOVES swim!!!!!!!"; } } class Animals{ private $_animal; public function __construct(animal $animal){ $this->_animal = $animal; } public function display(){ $this->_animal->walk(); $this->_animal->fly(); $this->_animal->swim(); } } $cat = new Animals(new Cat()); $dog = new Animals(new Dog()); $cat->display(); $dog->display(); Also, it almost looks like you're mixing PHP and JavaScript - in PHP all variables are prepended with a dollar sign. And the use of const is possible in PHP, but the way you've used it here looks a bit more like JavaScript to me.
  4. maxxd

    php libraries

    MLS search functionality is (mostly) determined by the system serving the stream. If your client is using RETS, you can use PHPRets to interact with the database. If your client is using FlexMLS, you'll use the SparkAPI for PHP. Both are well documented and easy to use, though in my experience FlexMLS is significantly faster and offers more robust on-the-fly searching and sorting. Also note that even using one of these libraries, you'll have to write custom code to make it actually do anything. Some sites have a cron set up to use one of the APIs above to download the day's MLS listings to a local database each night, at which point the filter, sort, and search functionality is all yours to design and develop.
  5. maxxd

    Need help with password validation

    http://us1.php.net/manual/en/function.password-verify.php and http://us1.php.net/manual/en/function.password-hash.php
  6. The other obvious solution is to paginate results. Infinite loading is fine and all, but there are issues with it (as you're finding now) that don't happen with simple pagination. For instance, if the user has JavaScript turned off - admittedly not very likely, but possible - window.history and state won't do anything.
  7. maxxd

    Transfer JS data to PHP

    I'm not sure what you mean by "re-shaped", but yes technically you could grab the contents of any structural element via JavaScript and then send that content as data to PHP via AJAX. However, you're not saving yourself any "lines of code". In fact, you're adding complexity to what should be a fairly simple system, given what you've described. Perhaps you could explain what exactly you're trying to do and why you're determined to do it this way?
  8. maxxd

    Sending mail from multiple table

    Pretty much exactly what @Barand said.
  9. maxxd

    Sending mail from multiple table

    Yes if you're trying to send three different emails to three different groups then you're pretty much out of luck. Run three queries to get the recipient pool for each email. That having been said, even if that is the goal you can definitely save some resources by using PHPMailer instead of PHP's native mail() function. You can add multiple recipients with the AddAddress() method, so instead of trying to send an email on each iteration of the while() loop, you can instead create a single instance of PHPMailer, call AddAddress on each iteration through the loop of recipients, then send them all in one call. Also, PHPMailer is more reliable and far more robust than PHP's native mail() function (unless there's been some major work to the mail() function while I wasn't watching).
  10. maxxd

    Getting hacked

    Is there a question here other than the obvious "Is this a terrible idea?" (yes. yes it is.)?
  11. maxxd

    pulling from database

    In all the unformatted code you just posted (use the "<>" button next time), there's no PHP.
  12. Absolutely needs to be validated on the server side as well. My wording could have been better - thanks!
  13. Or JavaScript; check the value on submit - call an alert() can return false if it's empty, otherwise proceed as normal.
  14. So, weird but ... I changed the ServerName to nodeserver.internal, destroyed the VM, rebooted my host machine, and ran vagrant up. It's all working now. No idea...
  15. Hi all. It's late and I'm hoping I'm just missing something simple because I can't get this working and it's driving me a bit crazy. I'm trying to set up a simple vagrant Ubuntu 18.04 box. The up and provisioning is actually working so far as I can tell - I can connect to phpmyadmin through Firefox and I can ssh into the box after up, but trying to navigate to http://node.server.test in Firefox fails with a 404. And I'm confused about that. So, my Vagrantfile contains this: config.vm.synced_folder "../pkg", "/var/www", create: true, owner: "vagrant", group: "www-data", mount_options: ["dmode=777,fmode=777"] # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. config.vm.provider "virtualbox" do |vb| # # Name the VirtualBox vb.name = "Node Server Testing" # # Customize the amount of memory on the VM: vb.memory = "1024" and my provision script contains this: echo "install apache" sudo apt-get -y install apache2 VHOST=$(cat <<EOF <VirtualHost *:80> ServerName "node.server.test" DocumentRoot "/var/www/public_html" <Directory "/var/www/public_html"> AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> EOF ) echo "${VHOST}" > /etc/apache2/sites-available/node.server.test.conf sudo a2ensite node.server.test sudo a2enmod rewrite sudo phpenmod mcrypt sudo service apache2 restart sudo rm -r /var/www/html Directory structure on the containing Windows box is as follows: D:\node_server_testing pkg\ os\ public_html\ index.html src\ js\ less\ sysfiles\ .vagrant\ setup.sh Vagrantfile This works in my other Vagrant boxes, but this one is simply not working. And again, what's weird is that I can connect to http://node.server.test/phpmyadmin/ without a problem. So I figure it's got to be an issue in the Vagrantfile sync directive or the setup Apache virtual host setup, but I can't find it. Many thanks in advance for any advice or pointing out the glaringly obvious mistake that I've made somewhere.
×

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.