Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. I imagine IE6/7 are trying to use the parent property, as opposed to your defined variable. Just to be safe you should never name variables after any reserved keywords/properties.
  2. Personally I'd just leave the window alone. Unless it's necessary for some type of application (quiz/exam style pop-ups spring to mind, which would be in a separate window anyway), there's really no need. Users will have their window sized how they want, and if you start playing around with it they much just close the tab altogether.
  3. It depends upon the type of software really; how often it's used, how often you want to send the data, etc.
  4. To be honest I think if somebody thought up a good domain name for such a thing, given the subject of these forums, I don't think they'd be quick to share it..
  5. Wha? That's not what he was saying. He's saying the values you were trying were outside of the allowed min/max you set. Changing it to an OR operator will return everything, because any number is more than x OR less than y.
  6. Wow.. overlooked that one. Putting it down to being the end of the day!
  7. If you remove the other WHERE clauses, just leaving the salary_from/to stuff, does it work?
  8. Adam

    Array

    Touché!
  9. You can't use BETWEEN in that situation because you don't have an exact value. You need to return results where `salary_from` is more than or equal to $salary_from, and `salary_to` is less than or equal to $salary_to: if (!empty($_GET['salary_to'])) { list($salary_from, $salary_to) = explode(':', $_GET['salary_to']); if (!empty($salary_from) && !empty($salary_to)) { $types[] = "`salary_from` >= " . intval($salary_from) . " AMD `salary_to` <= " . intval($salary_to); } } ** I was assuming here by the way that your values would be integers.
  10. True, although if you're only going use jQuery for this one thing you need to think whether it's worth the extra bandwidth of loading the entire framework.
  11. You need to assign the result of nl2br() to $mail: $mail = nl2br($mail);
  12. Read the contents of the file with file_get_contents into a variable and apply nl2br() to that.
  13. ... or nl2br() .. However what I said is true and may come in useful in the future when line-breaks are not the problem.
  14. It isn't PHP that ignores the white-space, it's the browser. If you look at the source you'll see the spacing is preserved. HTML offers the <pre> tag that by default preserves white-space, or you can apply the CSS property white-space:nowrap;.
  15. Strangely it works if the div is set to display:none. What you could do as a bit of a work around is wrap the response data in a hidden div and apply the .slideDown() to that?
  16. You can use: SELECT DISTINCT MAX(field2), field1 FROM $tableName
  17. No worries, I was just a little confused. Okay, well my advise would be to use a better data structure. Have you heard of JSON before? The PHP side is easy, all you need to do is run your array through json_encode and output to the browser. When the JavaScript receives it as the response text, JS can already read it; you just access it like a normal array. Quick example: <?php $array = array( 'part2' => true, 'part7' => false, 'part9' => false ); echo json_encode($array); ?> That will return: Then in your JavaScript you can just access it like a normal array: var part2 = ajax.responseText['part2'];
  18. So this is with JavaScript? You've posted in a PHP forum talking about explode .. a PHP function.
  19. This works for me: $str = 'éâäà1å'; echo htmlentities($str); // returns: éâäà1å Did you look at the source?
  20. An AJAX response..? I'm not sure I follow. The 'AJAX response' would be handled at the JS end. I have a possible better solution for you, but just need to know exactly what you mean first.
  21. 1) If you sort the array you could use array_shift and array_pop to remove the first and last 2. 2) Using array_shift/pop will automatically modify the keys to start from 0 again, so to get the subsequent highest and lowest value you can just use: $lowest = $array[0]; $highest = $array[count($array)-1];
  22. Are you paying for these services?
  23. Look into "mod_rewrite" to create the dynamic URLs. Looking at the site itself though, personally I prefer the old format (out of the 2). Rounded corners can obviously give a design a smoother appearance, but you seem to have gone backwards? I'd put them back in, just much smaller and less noticeable. Also you've added huge adverts everywhere.. they really don't help it! The different colours, fonts and styles used throughout the website don't work well together. For example in the header you have some shiny blue, reflective text; but then in the footer you have standard plain Times New Roman text, right next to a colourful Arial font or something link? When hovering over items in the navigation they display a very out of place orange/yellow background image, with the text in an odd position. It's nice to have effects like that, but done badly they make a site worse IMO. The search bar.. just doesn't look like a text box. If I weren't paying a lot of attention to the site, I doubt I'd have noticed that was even there. In the source you seem to have a lot of the facebook mark-up language, which you should be aware isn't valid HTML and only has any significance to their applications... not external websites. Obviously that means your website won't validate as HTML. Another point is you're using deprecated HTML tags like <center>. I'll be honest I don't entirely understand the point of this website; why would anyone care about what people like on Facebook? You even get told what your friends like on your feed page thing.
  24. The code you provided doesn't give much away, but that query to me looks as though it should only update 1 row? Where exactly do the multiple values come from?
  25. What ceycey's suggesting you use is AJAX, by the way. This article explains it better, and the example he talks you through is to load a text file: http://www.openhosting.co.uk/articles/webdev/5899/
×
×
  • 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.