-
Notifications
You must be signed in to change notification settings - Fork 0
sample.php
`<?php //print $_GET["tId"]; $con=mysql_connect("localhost","tv11","imtv11"); $sql = "select * from top where tid=".$_GET["tId"].""; // ".$_GET["tId"].""; // Check connection if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("tv11", $con); $result = mysql_query($sql); $resultArray = array(); if($row = mysql_fetch_array($result)){ $resultArray["detailTop"]=array(); $resultArray["detailTop"]["tid"]=$row["tid"]; $resultArray["detailTop"]["tname"]=$row["tname"]; $resultArray["detailTop"]["sex"]=$row["sex"]; $resultArray["detailTop"]["tmn"]=$row["tmn"]; $resultArray["detailTop"]["tmx"]=$row["tmx"]; $resultArray["detailTop"]["style"]=$row["style"]; $resultArray["detailTop"]["price"]=$row["price"]; $resultArray["detailTop"]["size"]=$row["size"]; $resultArray["detailTop"]["url_1"]=$row["url_1"]; $resultArray["detailTop"]["url_2"]=$row["url_2"]; } echo "". json_encode($resultArray,JSON_UNESCAPED_UNICODE) . ""; mysql_close($con);
?>`