Source Code index.php Webslesson Tutorial | Multiple Inline Insert into Mysql using Ajax JQuery in PHP


Multiple Inline Insert into Mysql using Ajax JQuery in PHP


Item Name Item Code Description Price

insert.php fetch.php

Item Data

'; while($row = mysqli_fetch_array($result)) { $output .= ' '; } $output .= '
Item Name Item Code Description Price
'.$row["item_name"].' '.$row["item_code"].' '.$row["item_description"].' '.$row["item_price"].'
'; echo $output; ?> Database -- -- Table structure for table `item` -- CREATE TABLE IF NOT EXISTS `item` ( `item_id` int(11) NOT NULL, `item_name` varchar(250) NOT NULL, `item_code` varchar(250) NOT NULL, `item_description` text NOT NULL, `item_price` varchar(30) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1; -- -- Dumping data for table `item` -- INSERT INTO `item` (`item_id`, `item_name`, `item_code`, `item_description`, `item_price`) VALUES (1, 'Grease', 'HP38AST', 'General purpose Grease', '50'), (2, 'Adhesive Epoxy', 'AS38DM33', 'Sealing epoxy', '20'), (3, 'Connector 2 Way', 'PH848383', 'To be used for power supply connection in ABB Molding Machine', '500'), (4, 'Laser Sensor', 'D383', 'Laser sensor for cutting machine', '10'), (5, 'Power Supply 24V', 'D098', '24 Volt power supply for meter unit packing dept', '5'), (6, 'V Belt 4', 'S34', 'V Belt for motor coupling drive used in milling machine, cutting machine, vibrator, seprator', '30'), (7, 'Pressure Sensor', 'P38AST-3938B', 'Pressure sensor 4-20mA unit for storage tanks', '6'), (8, 'LED Light Bulb', 'L24V3', '\n LED ights', '100'), (9, 'Item 1', 'Code1', 'Description1', '10'), (10, 'Item 2', 'Code 2', 'Description 2', '20'), (11, 'Item 3Â ', 'Code 3Â ', 'Description 3Â ', '30'); -- -- Indexes for dumped tables -- -- -- Indexes for table `item` -- ALTER TABLE `item` ADD PRIMARY KEY (`item_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `item` -- ALTER TABLE `item` MODIFY `item_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;