Jump to content

AndyB

Staff Alumni
  • Posts

    5,465
  • Joined

  • Last visited

    Never

Posts posted by AndyB

  1. Do we get a clue? What doesn't work? Do you get an error? What's the error message? Maybe this will help in the interim:
    [code]$sql = "INSERT INTO `list` (id, name, link, comments) VALUES ('', '$name', '$link', '$comm') ";[/code]
  2. I've looked over your code a couple of times and couldn't really follow what it was trying to do ... but I know a bit about captchas. Enough to write a free, downloadable, complete, simple, script that does the same thing. You're welcome to use it - [a href=\"http://www.digitalmidget.com/php_noob/captcha.php\" target=\"_blank\"]demo/download here[/a] - if your's refuses to play nicely.
  3. [a href=\"http://www.w3schools.com/css/tryit.asp?filename=trycss_background-attachment\" target=\"_blank\"]http://www.w3schools.com/css/tryit.asp?fil...ound-attachment[/a]

    example
    [code]<style type="text/css">
    body
    {
    background-image:
    url('smiley.gif');
    background-repeat:
    no-repeat;
    background-attachment:
    fixed
    }
    </style>[/code]
  4. Do you mean that you have [b]one field[/b] in each [b]row[/b] of your database that looks like url1,url2,url3 (all joined up but separated with commas)? If that's so you you need to retrieve the field and then use the explode() function on the comma separator to generate an array of links ...
  5. You have major html problems there, which are likely a root cause of many of your problems. There should only be one <html></html> set, only one <body></body> set ... you have many. Wild guess - you're using includes and have forgotten to remove the duplicate tags.

    I'd suggest you try to write valid code (which really isn't difficult at all).

    One reason why your page loads slowly might be that almost all the images are remotely hosted.
  6. [a href=\"http://www.halfadot.com/freehelp/imagepop.htm\" target=\"_blank\"]http://www.halfadot.com/freehelp/imagepop.htm[/a] - the examples there should how you how to do it with reusable code.
  7. Can you explain exactly what it is you want the script to do? Does it only display one icon? Can it display multiple icons? If so, under what circumstances?

    Maybe what you want is this:
    [code]if ($row['important'] == "yes") {
        $icon = "$template_path/images/important.gif";
    } else {

        if ($row['Locked'] == 1) {
            $icon = "$template_path/images/locked_topic.gif";
        } elseif ($row['Type'] == "Poll") {
            $icon = "$template_path/images/poll.gif";
        } elseif ($read_status == "new") {
            $icon = "$template_path/images/new.gif";
        } elseif ($read_status == "old") {
            $icon = "$template_path/images/old.gif";
        } elseif ($reply_num >= 10) {
            $icon = "$template_path/images/hottopic.gif";
        }
    }[/code]
  8. No. But the usual 'work around' for what you want to do is an image that's a gradient from something to the background colour of your page, and then use the CSS background property alternatives to prevent the background from tiling .... [a href=\"http://www.w3schools.com/css/pr_background-position.asp\" target=\"_blank\"]http://www.w3schools.com/css/pr_background-position.asp[/a]
  9. [code]<?php
    $mystring = "this is text with spaces";
    $words = explode(" ",$mystring); // split into array on space separator
    echo $words[0]; // first element of array, i.e. this
    ?> [/code]
  10. Wait a minute! Where does the information actually come from about player names and score (or whatever is used to rank them)? If it's from a database then you can construct a single query to retrieve the highest 19 scores, ordered by score .... Bit more information please, then we'll figure out what this has to do with a while loop, or a for loop, or a counter.
  11. I don't think I understand the question. If you want to move files from one host to another, use something like [a href=\"http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html\" target=\"_blank\"]PuTTY[/a] as the Telnet/SSH client. If - as imageshack does - you want to upload files from your computer (or your site users want to), then use a simple image uploader such as [a href=\"http://fundisom.com/phparadise/php/image_handling/image_upload_and_resize\" target=\"_blank\"]LixlPixel's excellent free script[/a].
  12. Visually, it's quite horrid. The header is a disaster. The color choices are unappetizing. I don't know why all the text has to be bold. Those can all be fixed (soon, one hopes). You don't have to go overboard with images but the 'net is a visual medium - add a bit of imagery as relief from text, text, text.

    On the technical side, it doesn't work too well at 800px resolution (that's probably still 40% of all users), and the navigation gives a bit of a surprise when you choose Home > News and get the 'main' menu options reappearing on the right of the News menu. Some pages have an inexplicable chunk of space after all the content.

    If you want a link-rich, text-heavy, site give a thought to users who don't use a mouse or who use a screen reader ... provide links that skip navigation sections.

    The concept is fine, but the execution leaves a lot of room for improvement.

  13. [!--quoteo(post=349469:date=Feb 25 2006, 10:45 PM:name=Twentyoneth)--][div class=\'quotetop\']QUOTE(Twentyoneth @ Feb 25 2006, 10:45 PM) [snapback]349469[/snapback][/div][div class=\'quotemain\'][!--quotec--]What it does, when you click submit, it sends you to "submit.php" and loads nothing but my layout. I dont get any error messages, my host has disabled it.[/quote]
    But there isn't any layout stuff in the version of submit.php that you posted.

    Try this:

    #1 change your form action to point to submit2.php and save that code
    #2 save exactly the code you posted above (as submit.php) as submit2.php but add the two error reporting lines from the post by hitman6003
    #3 upload the revised form code and submit2.php to your server

    Run the new version of the form script. If there are no errors, you should see a blank page. Check the email address you are sending this to, including the spam and/or junk folders (although using a POP3 email address usually works more reliably than a free webmail address). Let us know what happens.
×
×
  • 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.