Warning: Constant ABSPATH already defined in /homepages/15/d181455829/htdocs/bottleofbrass.com/wp-config.php on line 25
php | Bottle of Brass
  • php

    Working with Persian/Farsi on a Website HTML / PHP / MYSQL

    It took me a few hours to figure this out. Though it turned out to be quite simple. Everything needs to be in UTF-8. HTML Use the charset meta tag below: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> MYSQL The field needs to be collated “utf_8_persian_ci”. PHP Set the charset At the top of the document specify: header(“Content-type: text/html; charset=utf-8”); Set the database…

  • html,  php

    HTML codes for Date and State Selects

    State: <select name=”state”> <option value=”” selected=”selected”>Select a state…</option> <option value=”AL”>Alabama</option> <option value=”AK”>Alaska</option> <option value=”AZ”>Arizona</option> <option value=”AR”>Arkansas</option> <option value=”CA”>California</option> <option value=”CO”>Colorado</option> <option value=”CT”>Connecticut</option> <option value=”DC”>District of Columbia</option> <option value=”DE”>Delaware</option> <option value=”FL”>Florida</option> <option value=”GA”>Georgia</option> <option value=”HI”>Hawaii</option> <option value=”ID”>Idaho</option> <option value=”IL”>Illinois</option> <option value=”IN”>Indiana</option> <option value=”IA”>Iowa</option> <option value=”KS”>Kansas</option> <option value=”KY”>Kentucky</option> <option value=”LA”>Louisiana</option> <option value=”ME”>Maine</option> <option value=”MD”>Maryland</option> <option value=”MA”>Massachusetts</option> <option value=”MI”>Michigan</option> <option value=”MN”>Minnesota</option> <option value=”MS”>Mississippi</option>…