Header ("Content-type:text/html;charset=utf-8"); $servername = "localhost";//server address $username = "root";//Account $password = "[email protected]#";//password $dbname = "J OB_QYBK ";//Table name $conn =mysqli_connect ($servername, $username, $password, $dbname);//Connect database if (! $conn) Die ( "Database link Error! "); $sql = "SELECT * from Resume_information";//Check the statement $result =mysqli_query ($conn, $sql); if (Mysqli_num_rows ($result) > 0) {$ar =array (); Output data while ($row = Mysqli_fetch_assoc ($result)) {//Add array $ar []=array ("id" = = $row ["id"] ],//number "Sex" = $row ["Sex"]? Male ":" female ",//gender 1 for male 0 for female" name "+ = $row [" name "],//name" date "and" $row "[" Date "],//Birth date "Place" = $row ["Place"],//native Place "phone" + $row ["Phone"],//mobile number "Emergency" + $row ["Em Ergency "],//emergency contact" mail "=" + $row ["Mail"],//Mailbox "Present" + + $row ["Present"],//current place of residence "SchoOl "+ $row [" School "],//graduated institutions" education "and" education "],//the highest education" Major "and $row [" Major "],//Professional" certufucate "= $row [" certufucate "],//Professional Certificate" Grade "+ = $row [" Grade "],//English level "Life" = $row ["Life"],//work experience "Resume" and "],//" ("Resume") "Post" and "$row" ["POST"],//apply for position "Position" = "Position"],//to the Post time "Photoshop" and "" Photoshop "and" The $row ["]?" √ ":" ",//1 for Skilled 0 delegates will not" indesign "= $row [" InDesign "]?" √ ":" ",//1 for Skilled 0 delegates will not" iiiustrator "and" = "$row [" Iiiustrator "]?" √ ":" ",//1 for Skilled 0 delegates will not" premiere "and" $row ["premiere"]? √ ":" ",//1 for Skilled 0 delegates will not" dreamweaver "= $row [" Dreamweaver "]?" √ ":" ",//1 for Skilled 0 delegates will not" flash "= $row [" Flash "]?" √ ":",//1 for Skilled 0 delegates will not "other" and "=" and $row ["Other"],//others "fraction" and "+" = "fraction"]//score ); }//Return JSON format echo Json_encode ($ar); } else {echo "0"; }?>
PHP link Database mode and return JSON data