Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. ManiacDan

    openid

    Do you know how to program in PHP? Creating an openID client requires a lot of skill. It took me a couple weeks to internalize the documentation and get our API servers to talk to facebook's openID servers.
  2. I think you're getting a little confused by what's going on here, so even though this topic is marked "solved" I'm going to explain it again: Square brackets are special characters. They are not valid for use in: - URLs - Field names - Variable Names - File Names It has nothing to do with PHP, it has nothing to do with form encoding, it has nothing to do with your personal project. It has everything to do with computers in general, and the governing bodies that regulate how the internet and programming languages work. Also, mod_rewrite can do all kinds of fun things to your URLs, go play with that instead.
  3. Ok, you can't do that. Look, if you have: <input type="text" name="data[u]" /> Then $_GET['data']['u'] will be the value of that input. An input name cannot start with a square bracket. A PHP variable name cannot start with a square bracket. Why do you believe you need to do this? Describe the actual problem.
  4. None of those are cookies. To check your cookies, view the cookies for the current site using your browser's options menu, or a firefox plugin like View Cookies. Based on what you've said, I'm assuming cookies aren't the problem. Is session_start being called on EVERY page?
  5. Ok, this is a perfect example on how to debug on your own. Your question was: "My code goes right to the ELSE, what could be wrong?" The obvious (and only) answer to that question is "Your IF is resolving to FALSE." Now, look at the IF. There are three parts to the clause. var_dump all three. You'll find either: 1) $_SESSION['logged'] is not set 2) $_SESSION['logged'] is not equal to 1 3) $_SESSION['email'] is not set Or any combination of the three. Based on looking at your code, I agree with Philip. You'll find all three of the above conditions are true. If you were debugging this on your own, you'd follow up by saying "well then what the heck is even in the session!?" You'd find that nothing is in the session, which is when you slap your forehead and put session_start at the top.
  6. You think I could write a site that would ready your phpfreaks or facebook cookies? No. Cookies are hard locked to the domain they came from.
  7. Many browsers won't respect a cookie being set for the wrong site.
  8. You can't use the same session for two different sites, but you can certainly use the same database. Whatever functionality you use to log someone in, change that to a new, shared database. Move your authentication information to that shared db.
  9. How many cookies does your browser have for your site? Any more than a dozen and you'll get unexpected results.
  10. You should probably be using a real browser detector like this one.
  11. And now to define what you mean by "doesn't work."
  12. Ok then you're totally doing it wrong. In the form that creates the drop-downs, NAME THEM AFTER THE TOPPING. Look: <form method="POST"> <select name="toppings[chocolate]"> <option value=1>1</option> <option value=1>2</option> <option value=1>3</option> </select> <select name="toppings[orange]"> <option value=1>1</option> <option value=1>2</option> <option value=1>3</option> </select> <input type="submit" /> </form> When you submit this form, $_POST['toppings'] will be an array with the key being the topping name, and the value being what they chose from the drop-down. If you have full control of this data, there's no reason for you to be trying to associate random parallel arrays.
  13. Well...both arrays need to have an equal number of elements. Are you telling me that you're going to have a list of 2,3,4 and another list of Chocolate,Orange, and you're going to somehow make the computer figure out that they wanted 2 of Chocolate and 3 of Orange and 4 of...what? How, on paper, would you take "2,3,4" and "Chocolate,Orange" and get the output you're looking for? Maybe we're not understanding what you actually want. It seemed, up until just now, that you had an array of "quantities required" and an array of "type required" and you just needed to put them together.
  14. $_SESSION['topping'] and $_SESSION['notopping'] are presumably already arrays, so you don't need to put them inside MORE arrays. Also, you can format your output however you want, I just spit out whole sentences.
  15. Download the ScreenGrab! Firefox extension to capture entire web pages in a single PNG.
  16. Like maq suspected, your problem is because you've put this text in a narrow container. It has nothing to do with the text itself or the span around it, it's the fact that it's inside a narrow container. You can put this text in its own table row with a good colspan: ('<div id="username"> <form action="" method="post"/> <table><tr><td colspan=2><font color="red"> Wrong username or password, please try again </font></td></tr> <tr><td> <img src="imgs/Log In/username.png" alt=""/> </td><td> <input type="text" size="30" name="username" style="background-color:transparent;" /> </td></tr></table> <table><tr><td> <img src="imgs/Log In/password.png" alt=""/> </td><td> <input type="password" name="password" size="30" /> </td></tr></table> <form id="submitb" action=""> <input type="submit" value="Log in" /> </form> <p class="register">Not yet a member? <a href="Form.html">Register Here</a>, its Free!</p> </div>'); However, note that your <span> changed to a <font> tag, so I'm pretty much done at this point.
  17. Does it look like all the other fonts on the page? Lucinda is not a font. Perhaps you meant to write Lucida? Remove the font declaration entirely, it should look like all the other text on the internet.
  18. It's a facebook app, so it's probably flash. It's possible with javascript, but kind of annoying.
  19. in_array is not recursive, you have to write your own recursive version. Show us what $searchWords looks like.
  20. $a = array(2,6); $b = array('chocolate', 'orange'); $c = array_combine($b, $a); print_r($c); /*Array ( [chocolate] => 2 [orange] => 6 )*/ foreach ( $c as $topping => $amount ) { echo "{$amount} servings of {$topping}\n"; } /*2 servings of chocolate 6 servings of orange*/ -Dan
  21. This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=351029.0
  22. This is an HTML question, so I'm moving it to the proper board. Explain what you mean by increasing the width. How does it look now? How do you want it to look? Why do you believe width is the issue? Do you mean the width of the whole sentence or the individual letters?
  23. Ok, I'm going to explain this once more and then I'm done: You are trying to join race_results.position_fav_1 = alias1.fav. Now, think very hard: Are race_results.position_fav_1 and alias1.fav ever equal to each other? Ok, that's the problem. You have repeatedly insisted that those values are both equal and different. Are you trying to join on the wrong fields? Post the SHOW CREATE TABLE statements for both race_results and favourites. The query you gave as not working joins 7 tables but only selects from one of them.
  24. Putting the word "DISTINCT" after "SELECT" will eliminate all duplicate rows.
  25. Ask your teacher for help on this, it's obviously a homework assignment and you don't speak enough English for us to be of much help.
×
×
  • 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.