Note that there are some explanatory texts on larger screens.

plurals
  1. POInsert SQL Query is not executing successfully
    primarykey
    data
    text
    <p>I am inserting some data with below code but not getting inserted. I have checked every thing by echo <code>$_REQUEST</code> data everything is fine in output but doesn't insert data </p> <p>With this code. I am Grabbing the data from the form</p> <pre><code>$bname =$_REQUEST['bname']; $btype =$_REQUEST['btype']; $bemail =$_REQUEST['bemail']; $bwebsite =$_REQUEST['bwebsite']; $bphone =$_REQUEST['bphone']; $bpostal =$_REQUEST['bpostal']; $bcountry =$_REQUEST['bcountry']; $bannertype =$_REQUEST['bannertype']; $bgcolor =$_REQUEST['bgcolor']; $bheadcolor =$_REQUEST['bheadcolor']; $bsubheadcolor =$_REQUEST['bsubheadcolor']; $btextcolor =$_REQUEST['btextcolor']; </code></pre> <p>It gets echo easily with this </p> <pre><code>echo "$bname, $btype, $bemail, $bwebsite, $bphone, $bpostal, $bcountry, $bannertype, $bgcolor, $bheadcolor,$bsubheadcolor,$btextcolor"; </code></pre> <p>but when it comes to insertion doesnt work gives error</p> <pre><code>include 'dbconnect.php'; $sql="insert into company (business_id, business_name, business_type, bunsiness_email, business_website, work_phone, postal_code, business_country,banner_type, select_bgcolor, select_heading1, select_heading2, select_text) values ('NULL','".$bname."','".$btype."','".$bemail."','".$bwebsite."', '".$bphone."', '".$bpostal."', '".$bcountry."','".$bannertype."', '".$bgcolor."', '".$bheadcolor."', '".$bsubheadcolor."', '".$btextcolor."')"; mysql_query($sql) or die("An Error Occured while updating"); include 'dbclose.php';*/ </code></pre> <p>this is my table description</p> <pre><code>+----------------------------+---------------+------+-----+---------+----------- -----+ | Field | Type | Null | Key | Default | Extra | +----------------------------+---------------+------+-----+---------+----------- -----+ | business_id | int(10) | NO | PRI | NULL | auto_increment | | business_name | varchar(50) | NO | | NULL || | business_type | varchar(50) | NO | | NULL | | | business_email | varchar(50) | NO | | NULL | | business_website | varchar(50) | NO | | NULL | | work_phone | varchar(20) | NO | | NULL | | postal_code | varchar(20) | NO | | NULL | | business_country | varchar(20) | NO | | NULL | | banner_type | varchar(50) | NO | | NULL | | select_bgcolor | varchar(50) | NO | | NULL | | select_heading1 | varchar(50) | NO | | NULL | | select_heading2 | varchar(50) | NO | | NULL | | select_text | varchar(50) | NO | | NULL | </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload