Category Archives: Codes

PHP-MySQL Connection

For some time I discovered how to make a connection between a PHP document (script) and a MySQL database. To create dynamic sites that write and read a database is needed to introduce  into a PHP file that creates a connection between the two of them. This is a used predefined PHP function mysql_connect and can be invoked whenever we need a connection to a database. Continue reading PHP-MySQL Connection

What is HTML?

  • HTML stands for HyperText Markup Language, and is the predominant markup language for web pages.
  • HTML is the basic building-blocks of webpages.
  • A markup language is a set of markup tags, and HTML uses markup tags to describe web pages.
  • HTML markup tags are usually called HTML tags
  • HTML is written in the form of HTML elements consisting of tags, enclosed in angle brackets (like <html>) within the web page content. Continue reading What is HTML?

PHP Image upload and resize

We all have been in situation where we allow users to upload images for content items or profile pictures. They’ll just upload huge images without considering bandwidth and disk space. Soon you have hundreds images above 2MB in size cluttering your precious harddisk space and taking up all of the bandwidth with just a few pageviews.

So how do you conquer this problem? Well, resize the images automatically. Keeping their ratio and quality but reducing their size significantly.
Continue reading PHP Image upload and resize

Insert Picture and Images in html

Pictures may be the element you most wish to insert into your web pages other than text. Whether it is a photo or a graphic image, the HTML tag to do it is the same. Here’s an example of the <img> tag with its often used key attributes:

<img src=”images/my” alt=”MyPicture” width=”160″ height=”120″ hspace=”10″ vspace=”10″ align=”left” border=”0″ />

Continue reading Insert Picture and Images in html