Solved

mysql connection with jQuery and .ajax

Posted on 2011-02-16
2
1,346 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now