Values are not fetching in my WordPress website? This is the code, tell me the write way to fetch value from data base......Values are not fetching in my WordPress website? This is the code, tell me the write way to fetch value from data base......
<?php
$sql2= "SELECT seat_per_day from `wps_reservation_setting` " ;
$Data1 = mysql_query($sql2);
$row2 = mysql_fetch_array($Data1);
for($i = 1 ;$i <= $row2['seat_per_day'] ;$i++ )
{
?>
<option value="<?php print $i; ?>"><?php print $i; ?></option>
<?php } ?>