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

  • Home
  • SEARCH
  • 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 6362073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:51:38+00:00 2026-05-24T23:51:38+00:00

I built my website from bunch of php include files that work like a

  • 0

I built my website from bunch of php include files that work like a template. When I change something in one file whole website changes.

When I click on a radio button, ajax should activate and it should try to communicate with the other php file which should connect to the database and to send information back to the original page, but it can’t connect to the database, since that file contains the php include function, and it would only work if I’d put content of that include file manually there. but it won’t work if it put it like this

include("includes/connect.php");

and if I manually paste content into that file like this it will work

$connect = mysql_connect("localhost","root","");
mysql_select_db("demo") or mysql_error();

is there a way to make it work with include function?

  • 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-24T23:51:39+00:00Added an answer on May 24, 2026 at 11:51 pm

    You’ve forgot that include has nothing to do with client, javascript, post.
    You’re probably including file from wrong folder. Try to change

    include("includes/connect.php");
    

    to

    include(dirname(__FILE__)."/includes/connect.php");
    

    and make sure that includes/connect.php exists

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now I have my website built on PHP & Mysql. Consider this like a
I have built a website that I thought was free from css errors until
I'd like to be able to access GPS and Camera devices from websites built
I build a website, that: reads data from a website by HttpWebRequest Sort all
I have a website built in PHP 4 with a framework made by hand
When I originally built my website, it was handling only one interface, but now
I just built a website and have realised that I need to have a
I have client that built a website that is part static html and part
I'm writing an iPad application that mimics a flash website I built. The site
I'm programming an API of sorts on a PHP website I built with the

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.