Jump to content

KevinM1

Moderators
  • Posts

    5,222
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by KevinM1

  1. You still need to fetch the data after you run your queries. Look at mysql_fetch_assoc for more info.
  2. For us Noobs, can someone please break down what's going on in this form?? (in Lamens terms?) Prepared Statements is just for PDO connections its better to use it than connecting straight to mysql in the beginning, its harder to use than mysql, but then its really easy, and safer http://www.php.net/manual/en/book.pdo.php for more informations google -> PHP PDO ftw And for MySQLi, which is what the code example shows....
  3. KevinM1

    PHP or JS

    Yep. A perfectly cromulent sentence, I might add. I'm embiggened by your certainty.
  4. http://lmgtfy.com/?q=php+shopping+cart
  5. It's easier to save images on the disc, in folders, than it is to save them in a db. All your tables need is a column specifying the path to the image.
  6. From what I've been able to find via Google, it could be caused either by a corrupt install of the browser, or something you wrote which is fatally incompatible with IE (real helpful, I know). Is there anything you're doing on that page which is unique to the site? Maybe its choking on an animation or something. Some links for other suggestions: http://answers.microsoft.com/en-us/ie/forum/ie8-windows_other/browser-error-resieframedllacrerrorhtm-webpage/a1d28089-b953-4416-b214-17ae794126b3 http://www.sevenforums.com/tutorials/1222-internet-explorer-reset.html
  7. Please refrain from posting in threads that haven't seen activity in more than a month.
  8. KevinM1

    PHP or JS

    @CV I have some fingerless gloves. They're pretty cool. You should get a pair.
  9. Almost. Use: header("Location: search_results.php?friend={$row['member_id']}&me={$_SESSION['id']}&pic={$row['image']}&name={$row['username']}"); Array indices which are strings need to be denoted as such by being placed in quotes. Array values you want to parse in a double-quoted string need to be placed in curly braces.
  10. Both of you are at the top of the food chain. It has been my pleasure to have interacted with "ya'll." But don't stop yet, we have to fine tune this project. Did anyone else immediately think 'Where we're going, we don't need roads'?
  11. If-conditional statements work exactly the same in OOP as they do 'normally'. You need to check the entire thing twice, like so: if(user_has_role_assignment($USER->id, 1) || user_has_role_assignment($USER->id, 36)) { // do stuff }
  12. Why don't you try it and see if it works?
  13. A percentage is just a decimal. Store them as floats.
  14. http://www.phpfreaks.com/forums/index.php?topic=37442.0
  15. Try using your GetNumeric function on ContentMinutesSelect, like you did for your other form values....
  16. Gonna need to see some code.
  17. Okay, first put the code you post within tags. Second, you're trying to run before you can even crawl. Stop relying on tutorials and 3rd party code of dubious quality and get yourself a good book. Throwing a bunch of code at the problem without knowing what your problem actually is, or what the extra code you're slinging around does is the path to heartbreak and ruin. Professional apps, even the small ones, need to be written well, especially if others are going to use them. Third, along those lines, you need to refine your design in a big way. While PHP's unique feature is the ability to jump in and out of HTML, it's best you do so sparingly. There's a programming term called Separation of Concerns. The idea is that each component you use should be concerned with doing one thing well, and not concerned with other tasks. In an abstract sense, it means keeping your PHP as separate as possible from your HTML and, in turn, your HTML as separate as possible from your JavaScript (which IS NOT the same thing or a subset of Java - they're two completely different languages made by two separate companies). The idea is also part of the reasoning behind functions, classes,etc. Furthermore, well written PHP apps do all of their processing first, THEN display the results of that processing. Finally, you'd also be better of using modern HTML and CSS. The <font></font> tag is deprecated and no longer in use. Fourth, your original problem was that you never fetched the results from your query. The mysql_query function only returns a resource. In order to get the data, you need to invoke a function to fetch it. I'm partial to mysql_fetch_assoc. Finally, for your current problem, you need to be abundantly clear about what you want, what you have in terms of db data and table structure, and what results you're getting presently. Not my intention to sound harsh. I'm just trying to get you to put on the brakes before you go too far. You're missing some fundamentals, and your best solution is to slow down and try to do it the right/smart way. You'll actually wind up saving time in the long run.
  18. Ugh. The validation parser should be updated to ignore code within <script></script> tags. Doing the CDATA hack is so 2002.
  19. By the way, have you ever done a google search on the word "recursion"? Only a "geeky" company such as google would let someone implement what they did. Yeah, it's awesome.
  20. Also, for completeness, this isn't recursion. This is simple while-loop iteration. Recursion is a specific thing.
  21. Detail specifying how it's not working properly. As in, you're expecting: Parent 1 Child 1 Child 2 Child 3 Parent 2 Child 1 . . . But what are you actually getting as output?
  22. We're going to need more detail than that.
  23. Simply do a find-and-replace, swapping out: <?= With: <?php echo Be sure that the new lines end in a semicolon.
  24. Pretty good. A couple of suggestions: 1. Use a sans-serif font. Serif fonts are going the way of the Dodo, and they're especially not used in mobile apps. Pick something that will tie together the site and your apps. 2. Have the blocks in the phone change background colors on hover. It'll add just a touch of visual interest to the overall package.
×
×
  • 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.