PhP - SQL Query, Variable moves to the end of the Query -
i have query run input data mysql database. working fine pure text , numbers, inputting variables in:
$base_ids = 4; while($j <= $base_ids){ $row = array(keygenb()); foreach($row $value){ $query = "insert webstore(col_1) values('".$value."')"; echo $query; $result = mysqli_query($con,$query); } $j++; } when echo $query, there problem values('".$value."')"; echoing $query gives me this: ($value = xbox-cjbf-ont4-b7kk)
insert webstore(col_1) values('')xbox-cjbf-ont4-b7kk the $value gets stuck on end, rather put between quotes can executed. i'm sure easy fix, i've tried around few ways , haven't yet found way works.
many thanks,
mem
Comments
Post a Comment