Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. I am designing a sort of scavenger hunt for my husband and I's next anniversary. It will be a present that takes all year to completely finish, and every time he finishes a step in it he gets a tangible present (which may be small or large). So for example, part of it (which I already programmed), is a php page that he will access on his iPhone. It uses the phone's GPS to tell you how far away from a goal location you are, but not in which direction you need to go. You get about 25 chances to "test" it. (If you're more than a mile away, it just does miles, I got the accuracy down to a few feet so it's fairly close once you get under a mile). Once you get within a mile then you really only need 2 of the distances, if you use a map and mark where you were then you can find the two points which are that distance away, and if it's not one it's the other. Anyway once he gets to the location he gets one of the presents, and a clue for the next puzzle. I also built a cryptex out of PVC pipe, that contains a key inside, so to unlock something else for the puzzle he has to solve a riddle to get the cryptex open. other ideas I have are simple word puzzles like crossword/wordsearch. Harder stuff is challenges like having a game night with some of our friends, and when he beats person A at game X he gets a clue, etc. So I want it to have a thinking component and a social component - he's going to have to remember or find out details from our wedding, but also use his brain to solve puzzles. Since he is going back to school to become an engineer, and is very good with mechanics/how stuff works, I'd like to incorporate plenty of harder puzzles which I may not be able to do on my own, or even think of because that's not stuff that's interesting to me :-P There will also be a time component as one of the presents would be something like tickets to a basketball game, or for one a package has to be shipped. So if you guys have any ideas, suggestions on stuff I could incorporate, I'd love to hear it. This is something I've been working on for a while, but I need to start getting more specific and plan it out. Thanks.
  2. SELECT introduction_note, institute_code, DATE_FORMAT(registration_date, '%Y-%m-%d') AS date, image_name FROM institutes LEFT JOIN institute_images ON institutes.institute_id = institute_images.institute_id AND institute_images.image_type = 'slogan' WHERE institutes.institute_id = $instituteId LIMIT 1 Sorry, the whole query is kind of written backwards. The last line should refer to institutes not images. When you write the joins, write everything for the first table and make sure it works. The only stuff in the WHERE clause should be for the main table. anything else should be in the join clauses.
  3. Try this SELECT introduction_note, institute_code, DATE_FORMAT(registration_date, '%Y-%m-%d') AS date, image_name FROM institutes LEFT JOIN institute_images ON institutes.institute_id = institute_images.institute_id AND institute_images.image_type = 'slogan' WHERE institute_images.institute_id = $instituteId LIMIT 1 If you have the ID, why are you searching on the name too>
  4. If you're accessing a website in this method and you don't want them to find out, you're probably breaking their rules. Not something we are going to help with.
  5. Change the INNER join to a LEFT join.
  6. That's not a hash in programming terms, that's an anchor on a URL. Why don't you just remove it from the URL? Do you understand what the point is of the anchor?
  7. http://www.w3schools.com/html5/html5_form_input_types.asp I believe it is, that's how the iPhone browser and other browsers recognize fields like zipcode and automatically display the number keypad instead of text. Another source: http://stackoverflow.com/questions/593245/iphone-web-applications-and-specific-input-types
  8. Did you let them know you were posting their internal fulfillment site on a public form?
  9. Are you doing Access or MySQL? If you're using Access, none of your variables will be correct, and should cause errors. The original code is using the ADODB library. At the top of the code add error_reporting(E_ALL); ini_set('error_reporting', 1); Then change $conn->Execute($insert); to: if ($conn->Execute($insert) === false) { print "<p>SQL: $insert <br>Error: {$conn->ErrorMsg()}</p>"; }
  10. 4thed. Fix it now, it'll be easier in the long run.
  11. Well don't put 8 in each of them, put the ID in each one.
  12. I would Do this: Menus <input name="tagid" value="1" type="hidden" /> <input name="portfolioids[]" type="checkbox" value="8" /> And I believe a non checked box won't even pass in the $_POST, so you'll have an array called $_POST['portfolioids'] that contains all the values you checked. Then use an insert statement. There are many posts on here with examples of multiple inserts in one statement.
  13. Did you try creating it with backticks around the name. `words`
  14. No, what you said was "changing the structure isn't really the best choice for this one.". I counter that it probably is. If you have 100 pages of an application that would all have to be updated, you're doing it wrong.
  15. I think he meant to say logic and presentation. Code that DOES stuff goes first, then anything that displays, echos, makes it look pretty comes second. Read about Smarty or another templating engine to understand.
  16. You output a bunch of HTML before you try to load the file. That won't work.
  17. Better to take time now and fix it then forever have to deal with it.
  18. Make sure there's no whitespace in index.php before the <? or any of the includes.
  19. self thought Best typo I've seen in a while.
  20. xyph, how would you do it, more like my original suggestion? Or have a separate table for the messages/clicks?
  21. So you want it to be something they have to click to clear? Create a column in the user table called "read_latest_news". When you update the news, set everyone to 0. If a user logs in and has a 0, display the news. When they click it, set theirs to 1.
  22. This code has an error in it, and shouldn't even run, so you must have edited something before posting it. I don't see a session_start() anywhere. Is this the index file? $err = array(); ... if($err) $_SESSION['msg']['login-err'] = implode('<br />',$err); Will always evaluate to true.
  23. Write it out in pseudo code, then translate. Are you already storing the last time the user was active? (You'll have to do that on every page load, btw)
  24. This is perfectly valid, and looks a lot better than the way you suggested. http://us3.php.net/manual/en/language.types.string.php http://us3.php.net/manual/en/language.types.string.php#language.types.string.syntax.double http://us3.php.net/manual/en/language.types.string.php#language.types.string.parsing OP: Do you have error reporting on? What is the point of $file = $_GET['file']; ? Where does $pageWeb and $p_page come from?
×
×
  • 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.