I am submitting single query but its inserting two entries one of them with data another with blank values | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I am submitting single query but its inserting two entries one of them with data another with blank values

if(isset($_POST['sub'])){ $cbin =mysql_query("insert into tb_booking (b_hotelid,b_roomid,b_cusid,b_adults,b_kids,b_checkin,b_checkout,b_date) values('$hotelid','$rtype','$cid','$adl','$kd','$cin','$cout','$date')"); <input type="submit" name="sub" value="Submit">

27th Apr 2018, 4:59 AM
Harry Singh
Harry Singh - avatar
2 Answers
0
Your code seems to be correct.... But i can't see where you close that brace ( { ) on line one
27th Apr 2018, 8:17 PM
kukogho gabriel
kukogho gabriel - avatar
0
thanks for reply i already found the solution.
28th Apr 2018, 1:24 AM
Harry Singh
Harry Singh - avatar