FAQ
FAQ: How to fix error 403: access forbidden for phpmyadmin in wampserver?
The Problem:
PhpMyadmin works fine on localhost but accessing it over a network gives error 403: Access Forbidden.
Reason:
Reason is pretty clear – phpmyadmin is not configured to be accessed over a network. Permission to access it over network is not given.
Solution:
Locate the file phpmyadmin.conf in your wamp installation. If you have wampserver version 2 or higher, [...]
Read the rest of this entry >>
FAQ : How to toggle visibility of an html element by javascript
In my previous post, I discussed how we can change the style and/or css class of any html element by JavaScript. We can take advantage of this feature to add functionality where visibility of elements can be toggled. That means clicking a button will change the state of that element from visible to invisible and [...]
Read the rest of this entry >>
FAQ : Problem with javascript function parseInt
JavaScript function parseInt() is used to parse a string and extract the integer from that string.
Therefore if you do parseInt(”200xyz”), it will return 200.
The problem arises when you do the following:
var value = "010";
alert(parseInt(value)); // incorrect: will alert 8
You had expected 10 but what you got is 8.
Weird behavior, you must be thinking.
Actually not.It is [...]
Read the rest of this entry >>
FAQ: How to upload files in php?
Uploading files in web applications is a common practice. Thanks to php which makes it simple to implement.
This post will present a simple example of how to upload files using php.
Before any code, first let us understand the file upload process .
User is displayed a page with a file select box. She then selects a [...]
Read the rest of this entry >>
FAQ: How to fix php warning – “Cannot modify header information – headers already sent”
You must have seen this error message quite a lot of times.
Cannot modify header information – headers already sent
The following code sample will throw the same error:
//this will result in header error
<html>
<head><head>
<body>
<?php
header("Location:http://www.google.com");
?>
</body>
</html>
<?php ob_end_flush(); ?>
Outputting any html to browser before calling functions like session_start, header or any such function which sends http headers to the browser [...]
Read the rest of this entry >>

