Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. He's probably getting the list from another file, that has nothing to do with how the rest of the code is working, as he's seen that his array works.
  2. Restate the question more clearly. If you want all of the results in one row in your table, just change your HTML accordingly.
  3. What is the DNS_NS flag? What if you DNS_ALL or ANY?
  4. In your example query there, you'll need to put backticks around order as it's reserved.
  5. $_POST is for forms, you'll need to use $_GET. Also, pick id or pid, don't have the url say id and then expect to access it with pid Lastly, "$message .= 'Whole query: ' . $resultposts; Will not show you your query.
  6. Or just have it as a column, and when you insert one, select the max current value and add one.
  7. I think he's asking is there a row with the PersonID of 2, not a second column called that.
  8. What exactly does the output look like?
  9. Why would you have it in a .html? Did you configure your server to parse .html files as php? Try making it a .php and see if it works. What is the content of your .html file?
  10. You never use your $from variable. Look at "Example #2 Sending mail with extra headers." in the docs mail as it shows you how to use headers to set the from address.
  11. Why don't you just do the math in PHP instead of another query?
  12. I just saw that one, I get it now. That's perfect, saves me several lines. Thanks!!!
  13. Post the solution, and mark the topic as solved.
  14. Yep. I'm doing a foreach on the keys as columns in an html table. They're in the order I want them to output. So my options were to either create another array with the correct order (in which case I still have to put the value for the column title in the right spot) or just keep the keys in the right order when the new value was added. It looks like array_splice would replace the existing values in that spot, not insert a new one.
  15. If I have an array like this, what makes the most sense for inserting a key value pair after a given key? This is how I came up with to do it, after looking at the manual I'm not sure if there's a function I'm missing, because this seems way too complicated. <?php function addKV($arr, $keyToFind, $addKey, $addValue){ $keys = array_keys($arr); $spot = array_search($keyToFind, $keys); $chunks = array_chunk($arr, ($spot+1)); array_unshift($chunks[1], array($addKey=>$addValue)); $arr = call_User_Func_Array('array_Merge', $chunks); return $arr; } $myArr = array('id'=>1, 'name'=>'Name', 'created'=>time(), 'modified'=>time()); $myArr = addKV($myArr, 'name', 'foo', 'bar'); ?> $myArr now looks like array('id'=>1, name=>'Name', 'foo'=>'bar', 'created'=>time(), 'modified'=>time());
  16. It's not a coding technique, it's a really bad policy. Most people with a hyphenated last name would agree. It's nothing to do with how you programmed it, but what you chose to do. Just comment out the parts you don't want, and explain what "it breaks" means.
  17. You're seriously trying to limit people to 10 characters for their last name? That's awfully... I can't even come up with a word for it. Stupid maybe.
  18. IIRC, the doctype effects whether IE applies :hover to anything other than a link.
  19. But, but, mother's day is this Sunday! Surely it's not the time to remove parents! :-P
  20. That site is awesome, especially since I have a hard time matching socks. Just bookmarked it. Okay you have to explain this to me --- socks? I'm so confused!
  21. You realize YOU are the one asking for help yes? Have you TRIED using jQuery? Had you even heard of it? Is there a reason you're not using it? Did you post any code for us to actually work with? Have you looked at any other javascript libraries? What did you find on google that DIDN'T help and why didn't it? Or are you expecting someone to do it for you? My signature is actually pretty applicable. You've posted a vague problem with no explanation of what code you've tried, or any specifics other than you want to use AJAX. jQuery makes the task you've described very simple. It's up to you to implement it, and when you run into problems, you ask for help and explain where you are stuck, what the desired output is, and what you actually get. Since you're not even there yet, suggesting a library to try is quite applicable.
×
×
  • 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.