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 7631961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:29:38+00:00 2026-05-31T06:29:38+00:00

i might be doing some idiot mistake, but i could not figure that out.

  • 0

i might be doing some idiot mistake, but i could not figure that out. i have some values coming from html and wanna insert into mysql db. problem is, the very same query does not work in regular php file (that includes other queries), but when i try on an independent php file, it does. here is a sample of the code:

    $sql15="insert into body 
            (Article_ID, Article_Title) 
            values
            ('$article_id', '".$_POST['Article_Title']."') ";
    mysql_query($sql15);

as i mentioned, the very same code works when i just copy this snippet to a new php file, and it works smoothly.. as you see, there are 20+ insert with the same php, because there are 25+ tables, but data is not much. first 14 query and following 7 queries do work by the way.
do you have any ideas?

  • 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-31T06:29:40+00:00Added an answer on May 31, 2026 at 6:29 am

    There are some things to check and do.

    • Sanitize user input:
      "('$article_id', '".mysql_real_escape_string($_POST['Article_Title'])."')";
      You might also want to check if the value is what you expect.

    • Is your $article_id correct for column Article_ID?

    • Are your table and column names correct?

    • Check for errors:

    $res = mysql_query($sql15);
    if (!$res)
      echo mysql_errno($link) . ": " . mysql_error($link);
    
    • Show us you complete query:
      echo $sql15;
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update: I updated this after doing some digging and realizing that this might be
That might be a naive git question but here it is: Before doing a
I'm doing some research for a project that I might be doing soon, and
I have been doing some functional programming and had a question. Perhaps I might
This question might have asked here number of times . After doing some google
Well, I might be doing some work in Python that would end up with
I have a process that is doing some heavy maths with gl rather than
I'm just a beginner at c++ so I might be doing something wrong but
Might be my question is abstract or out of context, but i am asking
Might be a bit of noob question but it's something that's been getting me

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.