Parse error: syntax error, unexpected T_BREAK in C:\xampp\htdocs\website1\prompt.php on line 17

line 17 is in case 0 were it say break;

function createMessage($x)
{
    if(is_numeric($x))
    {
        switch($x)
        {
            case 0:
                $message = "Your account is now active. you may now <a href=\"login.php\">Log In!</a>"
                break;
            case 1:
                $message = "Thanks you for registering! A confirmation email has been sent to your email
                            Please click on the activation liink to ativate your account.";
                break;
            case 2:
                $message = "That email address or username has already been registered.";
                break;
            case 3:  //change?
                $message = "Sorry, but that item has already been traded";
                break;
            case 4:
                $message = "Item successfully updated!";
                break;
            case 5:
                $message = "Item successfully deleted";
                break;
            case 6:
                $message = "Message has been sent";
                break;
            case 7:
                $message = "Thank you for leaving feedback!";
                break;
            case 8:
                $message = "Item added successfully!";
                break;
            case 9:
                $message = "That is not your item";
                break;

            }
            echo $message;
    }
}
?>

you have forgot semi-colon ';' after

 case 0:
 $message = "Your account is now active. you may now <a href=\"login.php\">Log In!</a>"

put the semi-colon and it will be fine

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.