Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by Zane

  1. What does your table structure look like?

    What kind of data is inside the Scholarships column?

    What is inside $SETTINGS["data_table"]?

     

     

    Provide us either a screenshot of your structure and some data, or perform a DESCRIBE tableName query and give us the output.

     

    Your print_r is not inside a loop so I don't see how it's giving you that output

  2. Hello Everyone,

    We're finally back online now! The owner had the servers shut down and handed ownership to a friend of his to put it back online.  It was April 4th when the site was shut off, and here it is pretty much an entire month later, and we're back online. :)

     

    So basically, PHPFreaks.com has changed owners.

    • Like 1
  3. JavaScript != PHP

     

    There is a large range of things that can be done with JS that cannot be with PHP e.g, detecting a click event.  JavaScript is client side, therefore it is primarily used to capture client side interactions (clicks, idle time count, scrolling, hovering, and pretty much anything else you do with a mouse.  The keyboard is also an input from which to capture events.  The arrows, the types of characters, and just the act of typing is literally client side information.  The website you provided us with as your target project to accomplish in PHP, will require some JS in some way or fashion.

     

    What you can do, though, is use PHP to decipher the text entered and return the formatted string, but only after sending it to a PHP script and receiving it through AJAX.

  4. From the looks of your example, you haven't even tried to join two tables.. I only see one in your query.

    Look up "inner join" or "sql joins" on google.

     

    And, yea... mysql_ code is about as dead as IE8/9 right now.

    $c = new mysqli("server", "username", "password", "database name");
    $q = $c->query("SELECT 1");
    $a = $query->fetch_assoc();
  5. The ADA prohibits discrimination on the basis of disability in employment, State and local government, public accommodations, commercial facilities, transportation, and telecommunications. It also applies to the United States Congress.

    http://www.ada.gov/cguide.htm

     

    America is the land of opportunity, so yes, it is absolutely possible for a deaf person to become employed.  I imagine though, that it would make the Human Resources peoples' butt-holes tighten up a bit, because of fear of being suspected of discriminating against a disabled person.  Those with disabilities definitely have an advantage in gaining employment thanks to the ADA.  Technically, any disabled person could attempt to get a job that requires the very sense that they lack , and when denied the job, pull the ADA card and lawyer up to the issue.  Depending on the circumstances of the denial though, I wouldn't think it would even hold up in court.  I mean, a blind person is most definitely not qualified to be an airplane pilot, but that cannot stop that person from trying.  And even if that person fought tooth-and-nail to fight the court case, the person would still fail the eye exam to be a pilot, which is not discriminatory at all because there are people who can see that will fail the same vision test.

     

    A deaf person as a programmer?  I absolutely agree with everyone above, what can you bring to the table?  At the end of the day, you're going to be interviewed some way or another before being employed, and you'll have to explain exactly how, given your situation, you can help the business excel.  Personally, I would have no issue with hiring a programmer that is deaf, because you don't need to hear in order to program.  Most people program with music blaring in their headphones and that IMO is pretty close to being deaf.

     

    The same principle would go for an individual that is blind; they will never gain a job driving a vehicle, being a graphic designer, or being a cook for a restaurant.  There is that gray area though that exists for those individuals that demonstrate talents that allow them overcome their lack of one sense with an impressionable alternative.  Someone who is blind will most naturally gain a broader distribution of energy towards the senses.  I don't want to use the word "superhuman",  but rather, talented.

     

    I've met a few people who were deaf and it's unbelievable to realize how well their other senses allow them to survive.  Just by the way you breathe, smell, feel, a blind person can create a hypothesis and come to a conclusion just like everyone else.

     

    Long story short: You cannot be denied a job simply because you are deaf, but you can be denied a job if you do not meet certain expectations or pass certain examinations.

  6. Add another column to your database named auth_code or something. Create a single script that takes one GET parameter x. When the user finishes form submission, create a random auth_code, store it in the database table, send the code as a link to the aforementioned script which does something like this:

     

    if(isset($_GET['x']) {
    
    // Search the database for the auth_code
    // If it exists, then return the id of the user and set them to `active`
    
    }
    
  7. Whether it's legit or not depends on the circumstances. If the person using the snippet is aware that JS will be loaded along with it, then it's honorable. Though, looking back at your OP, I realize you're wanting to track the requests to your snippet generating script... not sure what I was thinking.

  8. SELECT
        Book.Title,
        Publisher.PublisherCode,
        Book.Type,
        t3.AuthorLast,
        t3.AuthorFirst,
        t4.AuthorLast,
        t4.AuthorFirst
    
    The t1,t2,etc.. are variables (so to speak) referring to a table. You can see from the pattern above that the notation for a field name is

    [tableName].[fieldName]

     

    The database name can also be prepended, but it's not necessary unless you're doing queries with several databases.

    [databaseName].[tableName].[fieldName]

     

    FROM Book,
        Publisher,
        Wrote t1, 
        Wrote t2,
        Author t3,
        Author t4
    
    This is where those variables or aliases have been declared. t1 is an alias for the Wrote table. For some reason your query queries from two different tables twice, (Wrote and Author), then Publisher, and Book

     

    Notice how there are not t's after Publisher and Book. It only means that they have not been aliased. If the t1 and t2 were not present in the above code, you would have to change your reference t1.BookCode to Wrote.BookCode

     

    WHERE
         Book.BookCode=t1.BookCode AND
         Book.BookCode=t2.BookCode AND
         t1.AuthorNum=t3.AuthorNum AND
         t2.AuthorNum=t4.AuthorNum AND
         Book.PublisherCode=Publisher.PublisherCode
         AND t3.AuthorNum != t4.AuthorNum
    
    GROUP BY Book.Title;
    
  9. First off

     

     

     

    the 2 snippets generate content on a users website

     

    What's an example of what this generated content looks like? You mentioned not wanting to use JS because you've grown out of doing that?

    All of the analytics resources out there use javascript snippets to generate the complex reports that they do, why wouldn't you want to use it?

  10. Though still, there is no answer to a critique.  A person needs to know the environment of the application, the usage, the context, the purpose, and so on in order to tell you what is bad about it.

     

    If I had any suggestion at all it would be to not return strings with arbitrary values.  True or false is very powerful in programming, much more so than something like "Failed to store template".  Because then, you have to check later to see if that function returned "Failed to store template" and not "Failed to store templat" (note the missing e)

     

    All that you're going to get out of your "question" is a bunch of "Why are you doing this that way?  You should do it this way {It's better practice})" yada yada.

  11. Perhaps, you're not getting an answer because no one understands your question.  Is there something not working?  Do you have unexpected output?  

    If you're just looking for security holes and suggestions and critiques to your system,then this belongs in Application Design.

     
×
×
  • 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.