Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS PHP Form Error Styling

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38752
    Waffle
    Member

    Hey Everyone, I’ve got a little problem that I shouldn’t have really…

    for some reason my p class = ‘error’ styling won’t show up in the web page.

    Heres the PHP code.

    $speech = "";

    if(isset($_POST)) {

    if ( $_POST == "" || $_POST == "" || $_POST =="" || $_POST =="" ) {

    $speech = "

    You have Left Something Blank.

    ";

    } else {

    $body = $_POST . 'n' .
    $_POST . 'n' .
    $_POST . 'nn' .
    $_POST;

    mail('[email protected]', "Your Message", $body);

    $speech = "

    Message Has been Sent

    ";

    }
    }

    And here is the CSS…

    p.success	{ background:#a1e494; border:1px solid #7db772; padding:10px 15px 8px 15px; margin:8px 4px 8px 4px; }‚Äč
    p.error { background:#f0b8bc; border:1px solid #b7797d; padding:10px 15px 8px 15px; margin:8px 4px 8px 4px; }

    Heres the HTML If it helps…
























    I hope this isn’t too much effort to solve; I’m sure the answer is very simple and I’ve overlooked something, Appreciate any help thank you =)

    #89055
    Waffle
    Member

    It is Outputting it all correctly, that’s not what I’m getting at, it’s the CSS style that’s not working.
    If you look at the CSS the p.error is not showing up but the p.success is workIng fine..

    #105338
    Waffle
    Member

    Yeah it doesn’t seem to work, I don’t know why the success class works but the error doesn’t.. All I can think of is my PHP

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.