Hello Ladies!
I have decided to move this blog over to my own domain, miketee.net.
See you there!
I have decided to move this blog over to my own domain, miketee.net.
See you there!
A recent project required my script to access and store records in a MySQL table hosted on another server. It can be done fairly quickly within a few clicks.
On the server that is hosting the MySQL database, we need to set the permission that will allow the other servers to connect to it. From cPanel:
1. Under Databases, click on "Remote MySQL".

Image via Siteground.com
2. Fill in the IP address of the other server that will be granted access to work with our MySQL database.
3. We're done!
On the other server, just point the database connection script to the MySQL host server.
I recently upgraded one of our phpBB forums from 3.0.4 to 3.0.5. The process was fairly painless - until I realized that the user registration page was totally screwed up.
The layout was distorted, and the CAPTCHA doesn't display, both in the user registration page and in the Administrator Control Panel (under Visualization).
At the top of the User Registration page were these error messages:
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_register.php on line 488: mt_rand() expects parameter 1 to be long, string given
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3824: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3826: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3827: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3828: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
Stumped, I checked the official phpBB forum and the general advise was to re-upload the 3.0.5 files, EXCEPT for "config.php" and the "images" and "files" folder.
Logged in to the Admininistrator Control Panel and cleared the cache, but the error messages remained.
In the end, the script that turned out to be the culprit was includes/constants.php. All I had to do was to re-upload the script, and the problem was solved.
References:
Can't get your images to show, even though you're damn sure that the image tags and the paths are correct?
Check the image filename again - "gstring.jpg" is not the same as "gstring.JPG"!When developing web apps, you will need sample data to play with. We usually go with "asd asd asd asdasa", "bla bla bla" or "First Name". That's lame.
GenerateData.com and FakeNameGenerator.com understands the programmer woes, and helps to generate some pretty real-looking data for development purposes.Let's say we have a vertical menu, made up of a bunch of links. The "clickable" target area for the links is confined to the text. Fair enough.

But we can do better. To improve usability, we want to enlargen the clickable area, as pictured below.

It can be done using CSS' display:block property. Just append it into the anchor link, as follows:
<a href="link.htm" style="display:block;">FAQ</a>CSS allows you to create horizontal menu using lists. While you can also do it with a series of <divs>, having them in lists can help to make the scripts cleaner, clearer and easier to maintain. Here are the very basic codes needed. Just copy and paste the CSS bits, and modify as necessary to suit your menu.
<style type="text/css">