Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    55
    Thanks
    3
    Thanked 4 Times in 4 Posts

    Simple HTML problem (I think)

    I have a problem that I believe has a simple answer.

    I'm working on an image uploading script. If, for some reason, you try to upload an unrecognized file type, it will say "You selected the wrong filetype!". Problem with this is, there's no background, so the background image of my site makes the text hard to read.

    Basically what I want is to make the background white, but it looks like PHP or something unfamiliar. Im not too great with coding.

    Here's the code:

    Code:
    } 
    
    else 
    { 
    echo "<font color=\"#333333\" face=\"Geneva, Arial, Helvetica, sans-serif\">You selected a wrong filetype!</font>
    <br>\n"; exit; 
    }
    Is there a simple line I can add in there somewhere that makes the BG white? I already tried a few things and no luck.

    Thanks in advance.

  • #2
    New Coder
    Join Date
    Jul 2008
    Posts
    55
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Okay, instead of just changing the background color, I'd like to redirect it to another page. So I tried:

    Code:
    } 
    else 
    { 
    echo "<meta http-equiv="refresh" content="0; url=http://www.google.com">
    \n"; exit; 
    }
    And it didnt work. How do I make it so instead of saying "You selected a wrong filetype!", it redirects instead? Thanks

  • #3
    Regular Coder Pepe, the bull's Avatar
    Join Date
    Feb 2005
    Location
    Vancouver, WA
    Posts
    163
    Thanks
    1
    Thanked 16 Times in 16 Posts
    In your first example, you have a backslash before every quotation mark in the font tag. Do you have to do that here as well?

    Code:
    } 
    else 
    { 
    echo "<meta http-equiv=\"refresh\" content=\"0; url=http://www.google.com\">
    \n"; exit; 
    }
    Is there any way to find out what script language you are using? There's probably a better alternative.
    Pepe, the bull

  • Users who have thanked Pepe, the bull for this post:

    jrp1 (07-11-2008)

  • #4
    New Coder
    Join Date
    Jul 2008
    Posts
    55
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Worked. Thanks alot, bud.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •