Solved

mysql connection with jQuery and .ajax

Posted on 2011-02-16
2
1,348 Views
Last Modified: 2012-06-21

I am slowly and painstakingly succeeding in applying AJAX with jQuery but occasionally I hit little walls.

This time I am chasing my tail with the following error messages:

1) Access denied for user 'secems'@'localhost' (using password: NO) in /home/s
2) A link to the server could not be established in /home/

What I have managed to understand is that when I use ajQuery approach and my call back function sends the URL, the actual php pages that are undelying are the cause. Now the code used to work _before_ i transfered some functionalities to jQuery...so I figure that all php code that is now part of a callback function does not benefit from "connections" made in the main PHP.

Anway, my question is:
Is there a way to have the underlying php which each may have 1 or 2 includes to other php files, is there a way to establish a connection that each of these files can use?

Thanks
0
Comment
Question by:gbeaulac
2 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 34913047
Create your connection string page separately and include it in every page where you need to interact with database and database connection.
0
 

Author Comment

by:gbeaulac
ID: 34913239
Thanks that does it.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question