Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Zane last won the day on November 10 2017

Zane had the most liked content!

Community Reputation

54 Excellent

About Zane

  • Rank
    Prolific Member
  • Birthday 08/19/1986

Recent Profile Visitors

16,544 profile views
  1. Zane

    New Guru: maxxd

    Yea, that's like ... a lot of miles away. Takes roughly 7 hours to get there given the abundance of mountainous terrain and drivers in front of you that can't handle it.
  2. Zane

    New Guru: maxxd

    Welcome aboard, maxxd! So where in NC are you from, btw? I'm from the same state.
  3. Zane

    COMPLETE - Planned Downtime: May 23rd-24th

    Hell yea! This looks nice!
  4. Zane

    Latest Conversations

    Assuming your db schema is setup properly, you would just add DESC to order descendingly by date_sent ORDER BY date_sent DESC But if you have a primary index also, you could select more accurately like this Add onto your ORDER BY clause, and order by the ID descendingly after ordering by date_sent. ORDER BY date_sent DESC, id DESC
  5. Simple! Check and make sure that the index isn't undefined first! Make sure that the variable is set. If a variable is not set, then it is not defined; it is undefined. PHP has a built-in function for this called: isset() Formed from the words "is" and "set". It's rather intuitive! $urlpx = ""; if( isset($_SERVER['HTTP_REFERRER']) ) { $urlpx=parse_url(strtok($_SERVER["HTTP_REFERER"],'?'), PHP_URL_PATH); }
  6. Zane

    Beginner in PHP - Populating form

    The simplest way would be to use a $_GET variable. These are otherwise known as URL parameters. So if you had a URL of: site.com/plant.php?pid=5 You could grab that value of 5 with a $_GET variable. $plantID = $_GET['pid'] Then your query would be $query = "SELECT * FROM plant WHERE plantID='" . $plantID . "'";
  7. Zane

    where to start with CUSTOMER TRACKING

    Well, you haven't provided any code for us to help you with, therefore we've resorted to direction. You've scoffed at the direction given, which is to plan this out. If it's so feasible, then come up with a prototype and ask for help when you run into issues. Otherwise, we have to stare at our crystal balls, and I admit, mine isn't plugged in. If you're just looking for code to pop up a dialog box, then JavaScript's prompt() function should do?
  8. Zane

    where to start with CUSTOMER TRACKING

    So, what happens when they hire someone from out of town who doesn't know everyone already? Or what if someone forgets who someone is? Is there going to be a big bulletin board in front of them with pictures of the customers like the most wanted list at the post office? Another option would be to collect their driver's license number and use that as their unique identifier, but that information is also pretty sensitive and people may not want to give it out. Long story short, if you rely on human activity to get your system flowing, then there will be errors and a lot of inconsistency what will ultimately give you quite a headache in the long-run.
  9. Zane

    where to start with CUSTOMER TRACKING

    So, if I understand correctly, you want to track your customers without putting too much of a burden on them? If that's the case, then I would give them something similar to an Ingles Advantage Card with a barcode on it. You would then create or buy some software to interpret that barcode and send it to your PHP script with an HTTP POST or GET request. Though, realistically, you'd need to convince them first why they need the card. Perhaps it offers discounts -- most likely reason. Anyway, that's beside the point. What you want to do is first create your PHP script to expect data in a particular format from a specific type of request. Most likely, you'd need to send information like the customer's unique identifier, an action, an action category, and an action value, or even an array of them. Program your script to do whatever you want it to depending on the use cases you can come up with. Once you've got that procedure down, you can then generate encoded strings to be converted into a barcode, which you'd print onto a card, which you'd probably laminate and give to the customers. Now, as far as code is concerned, that's all up to you. Draw out your project, draw arrows, make diagrams, and figure out how you yourself would code it, and then try to code it. Once you've done all of that and have actual coding attempts to show us, then this is the only advice we can possibly come up with.to help you.
  10. Zane

    where to start with CUSTOMER TRACKING

    For what it's worth, Google Analytics (GA) offers pretty much all the things you're looking for out-of-the-box, for free. https://support.google.com/analytics/answer/3123662?hl=en Read that UserID link. Once you have all the data in GA, then you can choose for yourself what to do with it. Whether that be for reporting within the GA interface itself, or for exporting large amounts of data to store on your own personal database server, your first step will be gathering the data and then figuring out how you want to deal with it. Unless I'm just completely misunderstanding what you're trying to do. If you're talking about a user management system where you're not exactly tracking traffic patterns or conversion goals, but rather user actions in general, like this site. I guess it boils down to what you're after: - Do you want to know which User IDs visits Pages X, Y, and Z of your site. - Or, do you want to know which User Names have performed actions throughout your site. If you want to go by User Names and actions, then you'll need to have a user management system since GA does not allow the storage of Personally Identifiable Information on their servers.
  11. From this sentence alone, it appears that you do have code that you could have provided That aside, you've already answered your own question as to which keywords to use in your Google searches. In my simple search for js ajax, I'm presented with a plethora of results and good examples and tutorials. Well, buckle up! If you only know those three fundamental languages then you're 75% of the way there to being an actual developer. To sum up what needs to happen in your code, however you chose to write it (given the tutorials from the google results): You have your HTML form on one page, you then create a separate file written in PHP to validate things for you and return data that you can use on your HTML page. Using JavaScript, you can perform an AJAX call to your PHP script, sending it the data to validate. In your same AJAX calling code, you are not only able to just send the data, but you are also able to receive the data; that's what AJAX stands for Asynchronous JavaScript and XML. Because the call is asynchronous, your page doesn't have to wait for the response from your PHP script. Your user will never even know the call to the PHP script is being made unless they're looking at their Network panel in Developer tools. So, if your PHP script takes a really long time to execute, it doesn't mean the user's page freezes like it would with a synchronous call to the PHP script. As I mentioned, in that same AJAX call to the PHP script, you can define what happens whenever the PHP script is finished executing. You can also define exactly what happens when the call has failed. The possibilities are endless in what you can accomplish with an AJAX call. Those possibilities are even more infinite if you know JavaScript! So, start practicing your JavaScript and follow some AJAX tutorials. Come back with your findings and provide actual code next time Personally, I find this example tutorial to be perfect for understanding the fundamentals and basic procedure of how an AJAX call is made. https://developer.mozilla.org/en-US/docs/Web/Guide/AJAX/Getting_Started There are also libraries out there that make this an even more streamlined process, such as jQuery.
  12. Zane

    Escaping the @ sign

    The rule of thumb in designing forms -- or any interface for the matter -- is to NEVER trust the user. Assume that your users are complete imbeciles. Because they are imbeciles, they do not think in the same way that you do. Just because someone put an extra period at the end of their top-level domain (TLD) doesn't mean it was an accident 100% of the time. Perhaps the user forgot the other part of their TLD because there is more than just ".com". There are at least 50 or more instances of ".com." in the list of all TLDs This is just a handful of examples: .com.ai .com.cd .com.ch .com.cn .com.ec .com.ee .com.eg .com.es .com.et .com.fr The best idea, in your situation, is to validate this as email format. PHP even has a function for this already built-in to its core. It's called filter_var() . Using this function, all you have to do is pass it the optional flag to validate a string as a valid email address: FILTER_VALIDATE_EMAIL So, your code would end up looking something like this: $email = filter_var( $_POST{'email'], FILTER_VALIDATE_EMAiL); Then, $email will either contain A.) The valid email address B.) a FALSE boolean value. You then choose how you want your logic to utilize that information.
  13. PHP has functionality for this already, found here: http://php.net/manual/en/function.date-diff.php And this isn't the PHP forum, btw. -moving to php forum
  14. Zane

    Which one is easy to learn?

    It all depends on what your project is. What kind of programming language will you need to make your project successful? Java is a lower level language than PHP. By lower-level, I mean that it is able to access more of the system than PHP. For instance, you can have a Java program manipulate and test input from an input device, such as a keyboard or mouse, or maybe even some weird USB type thing you have plugged in. With PHP, you can't really do that out-of-the-box. You have to install other extensions, and ultimately add permissions to PHP to access system commands -- commands which are written in another language altogether. With PHP, there is no shutdown computer function, unless you've coded it yourself. And even if you did, like I said, you'll ultimately be sending code in another language to be interpreted and executed.
  15. Zane

    Variable value return problem in php

    Not sure how much it will help your issue, it may. Anyway, you're missing an ampersand in front of matduree data += 'matduree='+matduree; data += '&startdate='+startdate; data += '&return_cleaning='+return_cleaning; change to this data += '&matduree='+matduree; data += '&startdate='+startdate; data += '&return_cleaning='+return_cleaning;

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.