Jump to content

Catfish

Members
  • Posts

    354
  • Joined

  • Last visited

Everything posted by Catfish

  1. Hi everyone reading this, I have used PHP before as a hobby programmer but recently my boss asked me to make a webpage to accept worker's hours and store them in a database. So I realize that in the last few years object oriented style has been added into PHP. I have learnt OOP (C++) about a decade ago and understand the fundamentals of it. If I am writing this website code, am I going to be better off spending the time to get familiar with the new OOP stuff in PHP and use that or would it be better to just use an old sequential style of programming? I know this may seem like apples and oranges and that it varies based on opinion, but maybe there can be reasons for me to use OOP over sequential. For instance, if I write this code to be flexible enough that I can do a basic "worker times" table first, then I might be able to add additional functionality later, like worker details and qualifications, all of which could be brought up with the click of a button. Will it generally be easier to add onto code using OOP?
  2. Hi forum visitors, I am wondering if anyone knows of some software that lets a user or computer analyze PDF files with the purpose of trying to find files that are laid out or LOOK (as in, when we as humans look at something and can tell it looks like something else) similar? I don't know the technical specification of PDFs, how they work exactly, or if this is even possible but is there anything like this? If there's not, is this even possible? I know there are new technologies like Google Goggles and TinEye.com that do this sort of thing with photos, so surely this would be possible with PDFs or other formats?
  3. what is the exact problem: 1. when you select "team 2" the page reloads and the player list for team 1 _disappears_ or 2. when you select "team 2" the page reloads and the _selections_ in the team 1 player list are unselected? if it is 1. i'd imagine you are not passing some data around correctly to maintain the output on the page, or your code is not using correct logic to keep the output on the page. if it is 2. (which i think will happen even if 1. isn't occuring) i'd say that remembering selections in forms over page refreshes is probably either a) client software dependant or b) require something like javascript to maintain the selections/inputs. I know for a fact I had to use some JS on one of my scripts to maintain text input values from submitting a form and then pressing "back" button, but i found this occured under Win32 and not under Linux platform - so it could also be client software controlling it sometimes.
  4. Rethinking what your pages are doing, I think what you said below may be a simpler way to get what you want done. from what i remember of your page, "classic" is the first value (X) and "content=who" is the second value (Y) isn't it? the value of content will be passed around in $_GET (as long as each link the user clicks has a ?content=value part) and the other value is always defined by the page name.
  5. from memory: session_start(); $_SESSION['x'] = "foo"; $_SESSION['y'] = "bar"; or you could just pass values around in $_GET or $_POST
  6. This LEFT JOIN is interesting stuff i've never seen before. From what I gather, what it is doing is pulling data from various (some arbitrary number) tables and creating a result set that shows unique rows based on ALL of the data from ALL of the tables. My question is, what would the result set look like if we just called: SELECT # Define all the fields you want to select. This has more benefits than just being faster. (Aliases) Users.id As userid # This "As userid" is called an Alias. It renames that field for only the query results. Users.name, # This is handy because we have 2 "id" fields in both tables. Users.email, Messages.id As messageid, Messages.subject, Messages.message FROM Users # This is Table 1, you "Start" from this table. without a LEFT JOIN ?
  7. i dont know exactly what 2 axis navigation is or does, but i would just pass two variable values around the place, maybe in a session value: $_SESSION['x'] and $_SESSION['y']. you can generate what page you need based off the value or those two values? or no?
  8. yeah i was wondering about how many times it would actually fail if you just based it on the starting letter, but couldn't think of many words where it doesn't, though knowing english, there is probably many of them.
  9. a regular expression preg_match() looking for the string starting with a vowel as a condition inside an if() statement would provide flow for "an" and an else {} for any other result ("a") would probably do it. don't have time to work out the regexp to use but.
×
×
  • 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.