Pregunta

Cuando solicito esta función

    //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')");
}

Por alguna razón desconocida, produce un error de servidor interno. Sinceramente, no tengo idea de por qué, solicito esta función a continuación y funciona bien

    //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')");

}

Con ambos les estoy solicitando uno tras otro como sigue

    articleadd()
    message()

Tengo, en la función que no funciona, reemplazó toda la consulta MySQL con una muy simple

    echo "hello world";

Y sin embargo recibo el error.

He intentado copiar y pegar cosas incluso la palabra "función" para asegurarme de que no estoy cometiendo un error tonto. Desafortunadamente, no tengo acceso al registro del servidor con mi proveedor de alojamiento. Por último, soy consciente de que no estoy aprobando las variables, y ese es un problema separado, pero sobre la base de que uno funciona sin variables y la prueba de "Hello World", este no puede ser el problema.

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top