Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7703797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:32:26+00:00 2026-05-31T23:32:26+00:00

When I request this function //Add the content to the database function articleadd() {

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:32:28+00:00Added an answer on May 31, 2026 at 11:32 pm

    As i can see, there is no values for the variables used inside the functions.
    You need to set the values of the variables like $userid, $author, $title from parameters or global variables

    function articleadd($title,$articlebody,$reference,$author,$userid,$ipaddress,$day,$month,$year,$token) {
    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')");}
    

    And call the function like this

    articleadd('title','articlebody','reference','author','userid','ipaddress','day','month','year','token');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a function like this: def eventcateg_detail(request): ca = EventTypeCategory.objects.values() for i in
I use this pseudo-class to make Ajax request to server: function RequestManager(url, params, success,
Okay, I have this code: <script language=javascript type=text/javascript> <!-- function requestPage(page) { var request
How can i add the session to a fakeContext ? This function have we
I do this ajax request: var response = $.ajax({ url: 'product/add', data: $(#formAddNewRow).serialize(), type:
So I have this javascript function, it sends an ajax requests to fetch a
I set a session like this: request.session['mykey']= 33 How do I clear it? I
I wanted to make a post request in this website: http://www.prezup.info/index.php?page=films in order to
I would like to send a html string with a GET request like this
I have code that does a web-service request. While doing this request I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.