We help IT Professionals succeed at work.
Get Started

SQL is not retrieving the form data on certain fields.

pingeyeg
pingeyeg asked
on
244 Views
Last Modified: 2007-03-23
Not sure why, but my sql statement is not retrieving what my form is sending out.  I have triple checked to make sure the variables are correct.  I'm not sure if it means anything, but the two that are not being retrieved are longtext strings in phpMyAdmin.

                   $strProviderservice = $_REQUEST['strProviderservice'];
            $strCompanyname = $_REQUEST['strCompanyname'];
            $strOwner = $_REQUEST['strOwner'];
            $strAddress = $_REQUEST['strAddress'];
            $strTown = $_REQUEST['strTown'];
            $strZipcode = $_REQUEST['strZipcode'];
            $strPhone = $_REQUEST['strPhone'];
            $str2ndphone = $_REQUEST['str2ndphone'];
            $strMobile = $_REQUEST['strMobile'];
            $strPager = $_REQUEST['strPager'];
            $strFax = $_REQUEST['strFax'];
            $strEmail = $_REQUEST['strEmail'];
            $strWebsite = $_REQUEST['strWebsite'];
            $strInbusiness_since = $_REQUEST['strInbusiness_since'];
            $strLicense = $_REQUEST['strLicense'];
            $strInsured = $_REQUEST['strInsured'];
            $strBonded = $_REQUEST['strBonded'];
            $strHours = $_REQUEST['strHours'];
            $str24houremerg = $_REQUEST['str24houremerg'];
            $strServicesoffered = $_REQUEST['strServicesoffered'];
            $strOtherservices = $_REQUEST['strOtherservices'];
            $strServicearea = $_REQUEST['strServicearea'];
            $strFreeestimate = $_REQUEST['strFreeestimate'];
            $strWorkguaranteed = $_REQUEST['strWorkguaranteed'];
            $strProvidertagline = $_REQUEST['strProvidertagline'];
            $strAd_size = $_REQUEST['strAd_size'];

$SQL = "INSERT INTO tblAdspace VALUES"
     . "("
     . "strProviderservice, strCompanyname, strOwner, strAddress, strTown, "
     . "strZipcode, strPhone, str2ndphone, "
     . "strMobile, strPager, strFax, "
     . "strEmail, strWebsite, strLicense, "
     . "strBonded, strHours, str24houremerg, strServicesoffered, "
     . "strOtherservices, strServicearea, strFreeestimate, strWorkguaranteed, strProvidertagline, strAd_size"
     . ") "
     . "VALUES("
     . "'" . $strProviderservice . "',"
     . "'" . $strCompanyname . "',"
     . "'" . $strOwner . "',"
     . "'" . $strAddress . "',"
     . "'" . $strTown . "',"
     . "'" . $strZipcode . "',"
     . "'" . $strPhone . "',"
     . "'" . $str2ndphone . "',"
     . "'" . $strMobile . "',"
     . "'" . $strPager . "',"
     . "'" . $strFax . "',"
     . "'" . $strEmail . "',"
     . "'" . $strWebsite . "',"
     . "'" . $strLicense . "',"
     . "'" . $strBonded . "',"
     . "'" . $strHours . "',"
     . "'" . $str24houremerg . "',"
     . "'" . str_replace("'", "''", $strOtherservices) . "',"
       . "'" . str_replace("'", "''", $strServicesoffered) . "', "
     . "'" . $strServicearea . "',"
     . "'" . $strFreeestimate . "',"
     . "'" . $strWorkguaranteed . "',"
     . "'" . str_replace("'", "''", $strProvidertagline) . "',"
     . "'" . $strAd_size . "'"
     . ") ";
      
       echo $SQL;
       die;
Comment
Watch Question
Research & Development Manager
Commented:
This problem has been solved!
Unlock 3 Answers and 29 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE