Pergunta

When I request this function

    //Add the content to the database
function articleadd() {
    mysql_query("INSERT INTO site_content (title,content,reference,author,userid,authorip,day,month,year,token) VALUES ('$title','$articlebody','$reference','$author','$userid','$ipaddress','$day','$month','$year','$token')");
}

For some unknown reason it produces a Internal Server Error. I honestly have no idea why, I request this function below and it works fine

    //Add a message if the user is not logged in
function message() {
mysql_query("INSERT INTO messages (from,to,subject,content,type,ip) VALUES ('$userid','$userid','The content $title is pending completion.','A article was attempted to be saved, however when the we tried to saved it there was no-one logged in. As a result we saved the article but quarantined it so it will not show on the website. To correct this error, please click the link below, review the article and confirm it should display on the site. <a href=$url>$url</a>','$type','$ipaddress')");

}

With both I am requesting them one after the other as follows

    articleadd()
    message()

I have, in the function which does not work replaced all the mysql query with a very simple

    echo "hello world";

And yet I get the error.

I have tried copying and pasting things even the word "function" to make sure I am not making a silly mistake. I unfortunately do not have access to the Server Log with my hosting provider. Lastly I am aware that I am not passing the variables, and that is a separate issue, but on the basis that one works with out variables and the "hello world" test this can not be the issue.

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top