Search results

  1. M

    MP3 player stops when collapsing div via jQuery

    As per the sig, code is not intended as a drop-in solution; study it to understand what it does. With its self-invoked anonymous function and use of the "around" advice pattern (replacing a function with one that wraps it), the first code sample has more to teach about JS. The last mostly...
  2. M

    Problem with my contact.php page

    When it comes to formatting code, please pick and apply an indent style. Read my sig for more guidelines.
  3. M

    MP3 player stops when collapsing div via jQuery

    That certainly makes it easier to step through, and makes it more obvious where the toggling code is hooked into the page. Note you can use an interactive debugger, such as Firebug (Chrome an Safari have one built in), to step through the code. jQuery ultimately uses hide to, well, hide an...
  4. M

    Server boru - PHP & mb_substr

    Boru is currently going through an maintenance and an upgrade; read the thread in "News and Announcements". If you're still having problems once the upgrade is complete, report back. Until then, sit tight.
  5. M

    MP3 player stops when collapsing div via jQuery

    Please create a minimal test case (including a link to a live page with non-minimized scripts) to work with. It's likely due to the display property of the hidden element, as you suppose, but it's much harder to confirm and fix the more extraneous code there is to wade through. If it is the...
  6. M

    How to set a predetermined value into an HTML select element via PHP

    As Adam points out, it should work, though your starting index is wrong if you want to start at 1. Did you try it? However, it duplicates code by printing an <output> element in more than one place. You can avoid this by setting a variable to hold optional attributes. <select> <?php for...
  7. M

    File get contents php - - need help

    It's best to assume whatever would cause the most problems: be consistent in the case you use (so the code will work when case matters) but never define different identifiers that differ only in case (so the code will work when case doesn't matter). This is a consequence of Postel's Law of...
  8. M

    Using PHP to create custom zip files for site visitors

    Some things in PHP (e.g. constants, variable names (which includes properties)) are case sensitive, but others aren't (e.g. functions, which includes methods). @enox10mx: please pick and apply an indent style when posting code to make it readable. Also, make sure your samples don't have syntax...
  9. M

    php error - i need help!

    There's no way to close a thread yourself. You can ask and hope that a forum admin will do it. To be sure of bringing it to an admin's attention, you could report your post and specify that you're just asking for the thread to be closed in the message. Note that if you use instead of the...
  10. M

    Get domain name (not subdomain)

    What do you want the result to be when the domain name has more than three components (e.g. "foo.bar.baz.bam.example.com")? Do you want a script that actually prints the domain, or a function that returns it?
  11. M

    How to set a predetermined value into an HTML select element via PHP

    To select an option in a select element by default, add the "selected" attribute to the option element, as per the various HTML specs. That's as precise as I can get using the information you've provided. When asking for help with code, include a minimal test case. Read my sig for more. Do you...
  12. M

    Page redirection problem

    Firstly, browse the forums a little better. All of the following has been covered many times in many threads. Please use [php], [html] or [code] tags (as appropriate) to separate and format code. Don't use die (or exit) when outputting HTML. You'll get invalid HTML. Read up on HTTP (try HTTP...
  13. M

    Using PHP to create custom zip files for site visitors

    Your description is too open-ended. What, exactly, is the issue? Where are you stuck? The documentation has the basic information: copying files, renaming files, manipulating ZIP archives, sending HTTP headers to redirect. To run PHP scripts not in response to an HTTP request, you need to set up...
  14. M

    Error establishing a database connection

    That's nowhere near enough information. For others to be of any help, you need to provide enough for the problem to be reproducible. That means minimal sample code, a link to a test page (a live version of the sample code), what you expect to happen and what actually happens (which includes the...
  15. M

    PHP help comparing user data to file

    Please use [php], [html] or [code] tags (as appropriate) to separate and format code. There's little need to copy data from the $_GET array to other variables. Homework should be based on the material from your class, so that's all that should be needed to complete the assignment. If you...
  16. M

    Javascript Addition Problem

    What, exactly, is the problem? What do you want/expect to happen? What actually happens? You should always include this information when asking for help. A few comments: Instead of separate variables, store the values in an array or object. Then loop over that, instead of saves (or make saves...
  17. M

    cant access my database

    Please use , [html] or [code] tags (as appropriate) to separate and format code. Note that the former two will colorize code, which will make certain errors (such as in the original sample) obvious. Compare: Syntax error: <?php $lochost1="localhost; $username1="delapazh"...
  18. M

    Pages outputing error 404

    Looking at the URLs used in the links on the page you give, they're all under /admin/cpanel (e.g. http://sconcepts.co.cc/admin/cpanel/allposts/Basic%20cURL%20Example%20with%20PHP), which is wrong on the face of it. Double check what the URLs should be, and how they're generated. Making...
  19. M

    Send mail server site client uses javascript

    Read the links in my sig and follow the guidelines.
  20. M

    Pages outputing error 404

    That's nowhere near enough information; read my sig for more. Moreover, if you search these forums for information on permissions, you'll find that only directories should have execute permissions, as no page script will be executed directly.
Top