Skip to content
Advertisement

Tag: javascript

PHP unable to identify sqlsrv_connect() function while trying to connect SQL Server

I’m trying to connect to my local SQL Server from a simple PHP file using the sqlsrv_connect() function, but every time I’m calling the file in the browser through localhost, it’s throwing a 500 (Internal Server Error) saying: PHP Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect() in C:inetpubwwwrootAJAX_Tutorialget_db_data.php:4 get_db_data.php is the file from which I’m trying to connect

how to display a footer button only on certain pages?

I have a page called footer.php which is included on all of my pages through PHP like so: <?php require_once “inc/footer.php”; ?> In the footer, I have a back to top button which I don’t want on some of my pages since they are small pages. What I have done so far is shown below. CSS (applying to all pages):

jQuery custom attr is not working in option tag

I have select type with having custom attr in option tag. When i am able to get the val, but not able to get the value in custom attribute. Here is Jsfiddle JSFIDDLE Answer So the problem is that you’re trying to get the values of the attributes from the select itself. What you want to do is to get

Calling class method in jquery

Hey im trying to build a simple inventory program. I have class like this : now i want to append rows in my table which contain select option like this: but new row wont added if call my class using normal php line. It does however add a new row if i remove the php line. So, how can i

I want to run daily php file with html and js content crontab

I am new to this topic and I have developed a .php file, which has an html code inside, which makes a series of functions through javascript and this through ajax, executes a php code, which registers data in the database, the code works correctly, when opening the url, internally it does the whole process. But what I want now

Allow css in framework [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 months ago. Improve this question How can I allow CSS in a custom framework? I use a framework from this video link. But it does not allow the use of

Function echos variable correctly to ajax file but in html doesn’t show anything

Php variable $testing correctly echos ajax file, but in html <?php echo $testing;?> doesn’t show anything. html: functions.php: Answer The solution is to add $(‘#featured-image’).html(data); to the script, which pass the data output to html. also moved php lines from html to function.php: I missunderstood how ajax works. The simplest answer imo is this diagram:

Advertisement