title: Registration Form not working. Error Occurred SQL
body: <p>For the past few days i have had a massive issue with my affiliate registration form not working when i add password to it. I am trying to use the password_hash() to make it secure since i am going through and making sure everything is secure and tight as possible. Code is below. Form keeps kicking back to message "An Error has occurred" which happens when SQL query doesn't work (Error).</p>
  
  <pre><code>&lt;?php
  /*
  *
  * Copyright 2017 by Jarrod Estepp
  * This script is private software and is illegal to
  * use without consent from Jarrod Estepp - hello@jarrodestepp.me
  *
  * register_process.php
  */
  
  include('../includes/settings.php');
  include('../includes/mysql.php');
  
  //Grab Login Info
  $company = $_POST['company'];
  $first_name = $_POST['firstname'];
  $last_name = $_POST['lastname'];
  $phone = $_POST['phone'];
  $email = $_POST['email'];
  $password = $_POST['password'];
  $password_hash = password_hash($password, PASSWORD_DEFAULT);
  $skype = $_POST['skype'];
  $aol = $_POST['aol'];
  $address = $_POST['address'];
  $city = $_POST['city'];
  $state = $_POST['state'];
  $zip = $_POST['zip'];
  $country = $_POST['country'];
  $payment_method = $_POST['payment_method'];
  $payment_details = $_POST['payment_details'];
  $traffic_detail = $_POST['traffic_detail'];
  $security_pin = $_POST['security_pin'];
  $ip = getIP();
  
  
  //check if email is already in use
  $checkUser = $conn-&gt;query("SELECT `email` FROM `affiliates` WHERE `email` = '{$email}'");
  $check = $checkUser-&gt;num_rows;
  
  if($check &gt; 0) {
      header("location: {$website_domain}/admin/settings_admins_add?s=1");
      die();
  }
  
  $sql = $conn-&gt;query("INSERT INTO affiliates (status, company, first_name, last_name, phone, email, password, skype, aol, address, city, state, zip, country, payment_method, payment_details, traffic_detail, security_pin)
  VALUES ('1', '$company', '$first_name', '$last_name', '$phone', '$email', '$password_hash', $skype', '$aol', '$address', '$city', '$state', '$zip', '$country', '$payment_method', '$payment_details', '$traffic_detail', '$security_pin')");
  
  
  if(!$sql) {
      header("location: {$website_domain}/affiliate/register?s=2");
      die();
  } else {
      header("location: {$website_domain}/affiliate/register?s=3");
      die();
  }
  
  
  ?&gt;
  </code></pre>
  
  <p>Next i have included the actual form if there is an issue ther which i really think its on the registration_process.php page but as said i have had no luck at all with getting it fixed. I have looked and looked all over this and many more sites for help and yet nothing.</p>
  
  <pre><code>&lt;?php
  /*
  *
  * Copyright 2017 by Jarrod Estepp
  * This script is private software and is illegal to
  * use without consent from Jarrod Estepp - hello@jarrodestepp.me
  *
  * register.php
  */
  include('../includes/settings.php');
  include('../includes/mysql.php');
  @$status = $_REQUEST['s'];
  ?&gt;
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;link rel="stylesheet" type="text/css" href="assets/css/login.css"&gt;
          &lt;script src="assets/js/login.js"&gt;&lt;/script&gt;
      &lt;title&gt;&lt;?php echo $website_name; ?&gt; - Affiliate Registration&lt;/title&gt;
      &lt;/head&gt;
  
  
  
      &lt;div class="login-page"&gt;
    &lt;div class="form"&gt;
        &lt;center&gt;&lt;h3&gt;Affiliate Registration&lt;/h3&gt;&lt;/center&gt;
        &lt;?php 
        if($status == 1) {
            echo '&lt;font color="red"&gt;Email is already connected to an account.&lt;/font&gt;';
        }
        if($status == 2) {
            echo '&lt;font color="red"&gt;An error occurred.&lt;/font&gt;';
        }
        if($status == 3) {
            echo '&lt;font color="green"&gt;Affiliate Account Successfully Created! Please allow up to 48 hours for your application to 
            be reviewed. One of our managers may reach out to you during this time!&lt;/font&gt;';
        }
        ?&gt;
      &lt;form class="login-form" action="register_process" name="affiliate_login" method="post"&gt;
        &lt;input type="text" name="company" placeholder="Company"/&gt;
        &lt;input type="text" name="firstname" placeholder="First Name" required&gt;
        &lt;input type="text" name="lastname" placeholder="Last Name"required&gt;
        &lt;input type="text" name="phone" placeholder="Phone" required&gt;
        &lt;input type="text" name="email" placeholder="Email" required&gt;
        &lt;input type="password" name="password" placeholder="Password" required&gt;
        &lt;input type="text" name="skype" placeholder="skype"/&gt;
        &lt;input type="text" name="aol" placeholder="AOL"/&gt;
        &lt;input type="text" name="address" placeholder="Mailing Address" required&gt;
        &lt;input type="text" name="city" placeholder="City" required&gt;
        &lt;input type="text" name="state" placeholder="State" required&gt;
        &lt;input type="text" name="zip" placeholder="Zip/Postal Code" required&gt;
        &lt;label&gt;&lt;b&gt;Country:&lt;/b&gt;&lt;/label&gt;
        &lt;select name="country" required&gt;
      &lt;option value="AF"&gt;Afghanistan&lt;/option&gt;
      &lt;option value="AX"&gt;Åland Islands&lt;/option&gt;
      &lt;option value="AL"&gt;Albania&lt;/option&gt;
      &lt;option value="DZ"&gt;Algeria&lt;/option&gt;
      &lt;option value="AS"&gt;American Samoa&lt;/option&gt;
      &lt;option value="AD"&gt;Andorra&lt;/option&gt;
      &lt;option value="AO"&gt;Angola&lt;/option&gt;
      &lt;option value="AI"&gt;Anguilla&lt;/option&gt;
      &lt;option value="AQ"&gt;Antarctica&lt;/option&gt;
      &lt;option value="AG"&gt;Antigua and Barbuda&lt;/option&gt;
      &lt;option value="AR"&gt;Argentina&lt;/option&gt;
      &lt;option value="AM"&gt;Armenia&lt;/option&gt;
      &lt;option value="AW"&gt;Aruba&lt;/option&gt;
      &lt;option value="AU"&gt;Australia&lt;/option&gt;
      &lt;option value="AT"&gt;Austria&lt;/option&gt;
      &lt;option value="AZ"&gt;Azerbaijan&lt;/option&gt;
      &lt;option value="BS"&gt;Bahamas&lt;/option&gt;
      &lt;option value="BH"&gt;Bahrain&lt;/option&gt;
      &lt;option value="BD"&gt;Bangladesh&lt;/option&gt;
      &lt;option value="BB"&gt;Barbados&lt;/option&gt;
      &lt;option value="BY"&gt;Belarus&lt;/option&gt;
      &lt;option value="BE"&gt;Belgium&lt;/option&gt;
      &lt;option value="BZ"&gt;Belize&lt;/option&gt;
      &lt;option value="BJ"&gt;Benin&lt;/option&gt;
      &lt;option value="BM"&gt;Bermuda&lt;/option&gt;
      &lt;option value="BT"&gt;Bhutan&lt;/option&gt;
      &lt;option value="BO"&gt;Bolivia, Plurinational State of&lt;/option&gt;
      &lt;option value="BQ"&gt;Bonaire, Sint Eustatius and Saba&lt;/option&gt;
      &lt;option value="BA"&gt;Bosnia and Herzegovina&lt;/option&gt;
      &lt;option value="BW"&gt;Botswana&lt;/option&gt;
      &lt;option value="BV"&gt;Bouvet Island&lt;/option&gt;
      &lt;option value="BR"&gt;Brazil&lt;/option&gt;
      &lt;option value="IO"&gt;British Indian Ocean Territory&lt;/option&gt;
      &lt;option value="BN"&gt;Brunei Darussalam&lt;/option&gt;
      &lt;option value="BG"&gt;Bulgaria&lt;/option&gt;
      &lt;option value="BF"&gt;Burkina Faso&lt;/option&gt;
      &lt;option value="BI"&gt;Burundi&lt;/option&gt;
      &lt;option value="KH"&gt;Cambodia&lt;/option&gt;
      &lt;option value="CM"&gt;Cameroon&lt;/option&gt;
      &lt;option value="CA"&gt;Canada&lt;/option&gt;
      &lt;option value="CV"&gt;Cape Verde&lt;/option&gt;
      &lt;option value="KY"&gt;Cayman Islands&lt;/option&gt;
      &lt;option value="CF"&gt;Central African Republic&lt;/option&gt;
      &lt;option value="TD"&gt;Chad&lt;/option&gt;
      &lt;option value="CL"&gt;Chile&lt;/option&gt;
      &lt;option value="CN"&gt;China&lt;/option&gt;
      &lt;option value="CX"&gt;Christmas Island&lt;/option&gt;
      &lt;option value="CC"&gt;Cocos (Keeling) Islands&lt;/option&gt;
      &lt;option value="CO"&gt;Colombia&lt;/option&gt;
      &lt;option value="KM"&gt;Comoros&lt;/option&gt;
      &lt;option value="CG"&gt;Congo&lt;/option&gt;
      &lt;option value="CD"&gt;Congo, the Democratic Republic of the&lt;/option&gt;
      &lt;option value="CK"&gt;Cook Islands&lt;/option&gt;
      &lt;option value="CR"&gt;Costa Rica&lt;/option&gt;
      &lt;option value="CI"&gt;Côte d'Ivoire&lt;/option&gt;
      &lt;option value="HR"&gt;Croatia&lt;/option&gt;
      &lt;option value="CU"&gt;Cuba&lt;/option&gt;
      &lt;option value="CW"&gt;Curaçao&lt;/option&gt;
      &lt;option value="CY"&gt;Cyprus&lt;/option&gt;
      &lt;option value="CZ"&gt;Czech Republic&lt;/option&gt;
      &lt;option value="DK"&gt;Denmark&lt;/option&gt;
      &lt;option value="DJ"&gt;Djibouti&lt;/option&gt;
      &lt;option value="DM"&gt;Dominica&lt;/option&gt;
      &lt;option value="DO"&gt;Dominican Republic&lt;/option&gt;
      &lt;option value="EC"&gt;Ecuador&lt;/option&gt;
      &lt;option value="EG"&gt;Egypt&lt;/option&gt;
      &lt;option value="SV"&gt;El Salvador&lt;/option&gt;
      &lt;option value="GQ"&gt;Equatorial Guinea&lt;/option&gt;
      &lt;option value="ER"&gt;Eritrea&lt;/option&gt;
      &lt;option value="EE"&gt;Estonia&lt;/option&gt;
      &lt;option value="ET"&gt;Ethiopia&lt;/option&gt;
      &lt;option value="FK"&gt;Falkland Islands (Malvinas)&lt;/option&gt;
      &lt;option value="FO"&gt;Faroe Islands&lt;/option&gt;
      &lt;option value="FJ"&gt;Fiji&lt;/option&gt;
      &lt;option value="FI"&gt;Finland&lt;/option&gt;
      &lt;option value="FR"&gt;France&lt;/option&gt;
      &lt;option value="GF"&gt;French Guiana&lt;/option&gt;
      &lt;option value="PF"&gt;French Polynesia&lt;/option&gt;
      &lt;option value="TF"&gt;French Southern Territories&lt;/option&gt;
      &lt;option value="GA"&gt;Gabon&lt;/option&gt;
      &lt;option value="GM"&gt;Gambia&lt;/option&gt;
      &lt;option value="GE"&gt;Georgia&lt;/option&gt;
      &lt;option value="DE"&gt;Germany&lt;/option&gt;
      &lt;option value="GH"&gt;Ghana&lt;/option&gt;
      &lt;option value="GI"&gt;Gibraltar&lt;/option&gt;
      &lt;option value="GR"&gt;Greece&lt;/option&gt;
      &lt;option value="GL"&gt;Greenland&lt;/option&gt;
      &lt;option value="GD"&gt;Grenada&lt;/option&gt;
      &lt;option value="GP"&gt;Guadeloupe&lt;/option&gt;
      &lt;option value="GU"&gt;Guam&lt;/option&gt;
      &lt;option value="GT"&gt;Guatemala&lt;/option&gt;
      &lt;option value="GG"&gt;Guernsey&lt;/option&gt;
      &lt;option value="GN"&gt;Guinea&lt;/option&gt;
      &lt;option value="GW"&gt;Guinea-Bissau&lt;/option&gt;
      &lt;option value="GY"&gt;Guyana&lt;/option&gt;
      &lt;option value="HT"&gt;Haiti&lt;/option&gt;
      &lt;option value="HM"&gt;Heard Island and McDonald Islands&lt;/option&gt;
      &lt;option value="VA"&gt;Holy See (Vatican City State)&lt;/option&gt;
      &lt;option value="HN"&gt;Honduras&lt;/option&gt;
      &lt;option value="HK"&gt;Hong Kong&lt;/option&gt;
      &lt;option value="HU"&gt;Hungary&lt;/option&gt;
      &lt;option value="IS"&gt;Iceland&lt;/option&gt;
      &lt;option value="IN"&gt;India&lt;/option&gt;
      &lt;option value="ID"&gt;Indonesia&lt;/option&gt;
      &lt;option value="IR"&gt;Iran, Islamic Republic of&lt;/option&gt;
      &lt;option value="IQ"&gt;Iraq&lt;/option&gt;
      &lt;option value="IE"&gt;Ireland&lt;/option&gt;
      &lt;option value="IM"&gt;Isle of Man&lt;/option&gt;
      &lt;option value="IL"&gt;Israel&lt;/option&gt;
      &lt;option value="IT"&gt;Italy&lt;/option&gt;
      &lt;option value="JM"&gt;Jamaica&lt;/option&gt;
      &lt;option value="JP"&gt;Japan&lt;/option&gt;
      &lt;option value="JE"&gt;Jersey&lt;/option&gt;
      &lt;option value="JO"&gt;Jordan&lt;/option&gt;
      &lt;option value="KZ"&gt;Kazakhstan&lt;/option&gt;
      &lt;option value="KE"&gt;Kenya&lt;/option&gt;
      &lt;option value="KI"&gt;Kiribati&lt;/option&gt;
      &lt;option value="KP"&gt;Korea, Democratic People's Republic of&lt;/option&gt;
      &lt;option value="KR"&gt;Korea, Republic of&lt;/option&gt;
      &lt;option value="KW"&gt;Kuwait&lt;/option&gt;
      &lt;option value="KG"&gt;Kyrgyzstan&lt;/option&gt;
      &lt;option value="LA"&gt;Lao People's Democratic Republic&lt;/option&gt;
      &lt;option value="LV"&gt;Latvia&lt;/option&gt;
      &lt;option value="LB"&gt;Lebanon&lt;/option&gt;
      &lt;option value="LS"&gt;Lesotho&lt;/option&gt;
      &lt;option value="LR"&gt;Liberia&lt;/option&gt;
      &lt;option value="LY"&gt;Libya&lt;/option&gt;
      &lt;option value="LI"&gt;Liechtenstein&lt;/option&gt;
      &lt;option value="LT"&gt;Lithuania&lt;/option&gt;
      &lt;option value="LU"&gt;Luxembourg&lt;/option&gt;
      &lt;option value="MO"&gt;Macao&lt;/option&gt;
      &lt;option value="MK"&gt;Macedonia, the former Yugoslav Republic of&lt;/option&gt;
      &lt;option value="MG"&gt;Madagascar&lt;/option&gt;
      &lt;option value="MW"&gt;Malawi&lt;/option&gt;
      &lt;option value="MY"&gt;Malaysia&lt;/option&gt;
      &lt;option value="MV"&gt;Maldives&lt;/option&gt;
      &lt;option value="ML"&gt;Mali&lt;/option&gt;
      &lt;option value="MT"&gt;Malta&lt;/option&gt;
      &lt;option value="MH"&gt;Marshall Islands&lt;/option&gt;
      &lt;option value="MQ"&gt;Martinique&lt;/option&gt;
      &lt;option value="MR"&gt;Mauritania&lt;/option&gt;
      &lt;option value="MU"&gt;Mauritius&lt;/option&gt;
      &lt;option value="YT"&gt;Mayotte&lt;/option&gt;
      &lt;option value="MX"&gt;Mexico&lt;/option&gt;
      &lt;option value="FM"&gt;Micronesia, Federated States of&lt;/option&gt;
      &lt;option value="MD"&gt;Moldova, Republic of&lt;/option&gt;
      &lt;option value="MC"&gt;Monaco&lt;/option&gt;
      &lt;option value="MN"&gt;Mongolia&lt;/option&gt;
      &lt;option value="ME"&gt;Montenegro&lt;/option&gt;
      &lt;option value="MS"&gt;Montserrat&lt;/option&gt;
      &lt;option value="MA"&gt;Morocco&lt;/option&gt;
      &lt;option value="MZ"&gt;Mozambique&lt;/option&gt;
      &lt;option value="MM"&gt;Myanmar&lt;/option&gt;
      &lt;option value="NA"&gt;Namibia&lt;/option&gt;
      &lt;option value="NR"&gt;Nauru&lt;/option&gt;
      &lt;option value="NP"&gt;Nepal&lt;/option&gt;
      &lt;option value="NL"&gt;Netherlands&lt;/option&gt;
      &lt;option value="NC"&gt;New Caledonia&lt;/option&gt;
      &lt;option value="NZ"&gt;New Zealand&lt;/option&gt;
      &lt;option value="NI"&gt;Nicaragua&lt;/option&gt;
      &lt;option value="NE"&gt;Niger&lt;/option&gt;
      &lt;option value="NG"&gt;Nigeria&lt;/option&gt;
      &lt;option value="NU"&gt;Niue&lt;/option&gt;
      &lt;option value="NF"&gt;Norfolk Island&lt;/option&gt;
      &lt;option value="MP"&gt;Northern Mariana Islands&lt;/option&gt;
      &lt;option value="NO"&gt;Norway&lt;/option&gt;
      &lt;option value="OM"&gt;Oman&lt;/option&gt;
      &lt;option value="PK"&gt;Pakistan&lt;/option&gt;
      &lt;option value="PW"&gt;Palau&lt;/option&gt;
      &lt;option value="PS"&gt;Palestinian Territory, Occupied&lt;/option&gt;
      &lt;option value="PA"&gt;Panama&lt;/option&gt;
      &lt;option value="PG"&gt;Papua New Guinea&lt;/option&gt;
      &lt;option value="PY"&gt;Paraguay&lt;/option&gt;
      &lt;option value="PE"&gt;Peru&lt;/option&gt;
      &lt;option value="PH"&gt;Philippines&lt;/option&gt;
      &lt;option value="PN"&gt;Pitcairn&lt;/option&gt;
      &lt;option value="PL"&gt;Poland&lt;/option&gt;
      &lt;option value="PT"&gt;Portugal&lt;/option&gt;
      &lt;option value="PR"&gt;Puerto Rico&lt;/option&gt;
      &lt;option value="QA"&gt;Qatar&lt;/option&gt;
      &lt;option value="RE"&gt;Réunion&lt;/option&gt;
      &lt;option value="RO"&gt;Romania&lt;/option&gt;
      &lt;option value="RU"&gt;Russian Federation&lt;/option&gt;
      &lt;option value="RW"&gt;Rwanda&lt;/option&gt;
      &lt;option value="BL"&gt;Saint Barthélemy&lt;/option&gt;
      &lt;option value="SH"&gt;Saint Helena, Ascension and Tristan da Cunha&lt;/option&gt;
      &lt;option value="KN"&gt;Saint Kitts and Nevis&lt;/option&gt;
      &lt;option value="LC"&gt;Saint Lucia&lt;/option&gt;
      &lt;option value="MF"&gt;Saint Martin (French part)&lt;/option&gt;
      &lt;option value="PM"&gt;Saint Pierre and Miquelon&lt;/option&gt;
      &lt;option value="VC"&gt;Saint Vincent and the Grenadines&lt;/option&gt;
      &lt;option value="WS"&gt;Samoa&lt;/option&gt;
      &lt;option value="SM"&gt;San Marino&lt;/option&gt;
      &lt;option value="ST"&gt;Sao Tome and Principe&lt;/option&gt;
      &lt;option value="SA"&gt;Saudi Arabia&lt;/option&gt;
      &lt;option value="SN"&gt;Senegal&lt;/option&gt;
      &lt;option value="RS"&gt;Serbia&lt;/option&gt;
      &lt;option value="SC"&gt;Seychelles&lt;/option&gt;
      &lt;option value="SL"&gt;Sierra Leone&lt;/option&gt;
      &lt;option value="SG"&gt;Singapore&lt;/option&gt;
      &lt;option value="SX"&gt;Sint Maarten (Dutch part)&lt;/option&gt;
      &lt;option value="SK"&gt;Slovakia&lt;/option&gt;
      &lt;option value="SI"&gt;Slovenia&lt;/option&gt;
      &lt;option value="SB"&gt;Solomon Islands&lt;/option&gt;
      &lt;option value="SO"&gt;Somalia&lt;/option&gt;
      &lt;option value="ZA"&gt;South Africa&lt;/option&gt;
      &lt;option value="GS"&gt;South Georgia and the South Sandwich Islands&lt;/option&gt;
      &lt;option value="SS"&gt;South Sudan&lt;/option&gt;
      &lt;option value="ES"&gt;Spain&lt;/option&gt;
      &lt;option value="LK"&gt;Sri Lanka&lt;/option&gt;
      &lt;option value="SD"&gt;Sudan&lt;/option&gt;
      &lt;option value="SR"&gt;Suriname&lt;/option&gt;
      &lt;option value="SJ"&gt;Svalbard and Jan Mayen&lt;/option&gt;
      &lt;option value="SZ"&gt;Swaziland&lt;/option&gt;
      &lt;option value="SE"&gt;Sweden&lt;/option&gt;
      &lt;option value="CH"&gt;Switzerland&lt;/option&gt;
      &lt;option value="SY"&gt;Syrian Arab Republic&lt;/option&gt;
      &lt;option value="TW"&gt;Taiwan, Province of China&lt;/option&gt;
      &lt;option value="TJ"&gt;Tajikistan&lt;/option&gt;
      &lt;option value="TZ"&gt;Tanzania, United Republic of&lt;/option&gt;
      &lt;option value="TH"&gt;Thailand&lt;/option&gt;
      &lt;option value="TL"&gt;Timor-Leste&lt;/option&gt;
      &lt;option value="TG"&gt;Togo&lt;/option&gt;
      &lt;option value="TK"&gt;Tokelau&lt;/option&gt;
      &lt;option value="TO"&gt;Tonga&lt;/option&gt;
      &lt;option value="TT"&gt;Trinidad and Tobago&lt;/option&gt;
      &lt;option value="TN"&gt;Tunisia&lt;/option&gt;
      &lt;option value="TR"&gt;Turkey&lt;/option&gt;
      &lt;option value="TM"&gt;Turkmenistan&lt;/option&gt;
      &lt;option value="TC"&gt;Turks and Caicos Islands&lt;/option&gt;
      &lt;option value="TV"&gt;Tuvalu&lt;/option&gt;
      &lt;option value="UG"&gt;Uganda&lt;/option&gt;
      &lt;option value="UA"&gt;Ukraine&lt;/option&gt;
      &lt;option value="AE"&gt;United Arab Emirates&lt;/option&gt;
      &lt;option value="GB"&gt;United Kingdom&lt;/option&gt;
      &lt;option value="US"&gt;United States&lt;/option&gt;
      &lt;option value="UM"&gt;United States Minor Outlying Islands&lt;/option&gt;
      &lt;option value="UY"&gt;Uruguay&lt;/option&gt;
      &lt;option value="UZ"&gt;Uzbekistan&lt;/option&gt;
      &lt;option value="VU"&gt;Vanuatu&lt;/option&gt;
      &lt;option value="VE"&gt;Venezuela, Bolivarian Republic of&lt;/option&gt;
      &lt;option value="VN"&gt;Viet Nam&lt;/option&gt;
      &lt;option value="VG"&gt;Virgin Islands, British&lt;/option&gt;
      &lt;option value="VI"&gt;Virgin Islands, U.S.&lt;/option&gt;
      &lt;option value="WF"&gt;Wallis and Futuna&lt;/option&gt;
      &lt;option value="EH"&gt;Western Sahara&lt;/option&gt;
      &lt;option value="YE"&gt;Yemen&lt;/option&gt;
      &lt;option value="ZM"&gt;Zambia&lt;/option&gt;
      &lt;option value="ZW"&gt;Zimbabwe&lt;/option&gt;
  &lt;/select&gt;&lt;br&gt;&lt;br&gt;
  &lt;?php
  $paymentType = $conn-&gt;query("SELECT * FROM payment_types");
  echo "&lt;label&gt;&lt;b&gt;Payment Method:&lt;/b&gt;&lt;/label&gt; &amp;nbsp;";
  echo "&lt;select name='payment_method' required&gt;";
  while($row = mysqli_fetch_array($paymentType, MYSQL_ASSOC)) {
      $id = $row['id'];
      $name = $row['name'];
      echo "&lt;option value='{$id}'&gt;{$name}&lt;/option&gt;";
  }
  echo "&lt;/select&gt;";
  ?&gt; &lt;br&gt;&lt;br&gt;
        &lt;label&gt;&lt;b&gt;Payment Details:&lt;/b&gt;&lt;/label&gt;
        &lt;textarea cols="30" rows="6" name="payment_details" placeholder="Payment Details" required&gt;&lt;/textarea&gt;&lt;br&gt;&lt;br&gt;
        &lt;label&gt;&lt;b&gt;Traffic Detail:&lt;/b&gt;&lt;/label&gt;
        &lt;textarea cols="30" rows="6" name="traffic_detail" placeholder="Traffic Detail" required&gt;&lt;/textarea&gt;&lt;br&gt;&lt;br&gt;
        &lt;input type="text" name="security_pin" placeholder="Account Security Pin" required&gt;
        &lt;button type="submit"&gt;Register&lt;/button&gt;
      &lt;/form&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;/html&gt;
  </code></pre>
  
  <p>**Do not mind my copyrights. This is my first project and i have learned a lot so far but this is an issue i have not fixed in hours of time. All answers appreciated!</p>