杭州市 摇号 (杭州市摇号查询小客车摇号官网)
杭州休闲
05-23
阅读:42
评论:0
![](/gg/hf11.gif)
![杭州市 摇号 (杭州市摇号查询小客车摇号官网)](https://zhfxb.com/thumb/20240523001440_25646.jpg)
摇号结果:
";echo "-
";echo "
- 身份证号码:{$id_number} ";echo "
- 号牌种类:{$plate_type} ";echo "
- 摇号序列号:{$lottery_result['serial_number']} ";echo "
- 摇号日期:{$lottery_result['lottery_date']} ";echo "
- 摇号结果:";if ($lottery_result['lottery_status'] == '中签') {echo " 中签 ";} else {echo " 未中签 ";}echo " ";echo "
{$result['message']}
";}}?>
style.css
css
body {font-family: Arial, sans-serif;
}.container {width: 500px;margin: auto;
}form {display: flex;flex-direction: column;gap: 10px;
}label {font-weight: bold;
}.result {background-color: efefef;padding: 10px;margin-top: 10px;
}.success {color: green;
}.failure {color: red;
}query.php
php
'330101199001010001','plate_type' => '小型车','serial_number' => '123456','lottery_date' =>'2023-03-01','lottery_status' => '中签',],['id_number' => '330101199001010002','plate_type' => '小型车','serial_number' => '654321','lottery_date' => '2023-03-01','lottery_status' => '未中签',],];// 根据身份证号码和号牌种类查找结果foreach ($results as $result) {if ($result['id_number'] == $id_number && $result['plate_type'] == $plate_type) {return ['status' => 'success', 'data' => $result];}}return ['status' => 'error', 'message' => '未找到符合条件的摇号结果'];
}// 处理表单提交
if (isset($_POST['id_number']) && isset($_POST['plate_type'])) {$result = query_lottery_result($_POST['id_number'], $_POST['plate_type']);if ($result['status'] == 'success') {// 返回查询结果echo json_encode($result);} else {// 返回错误信息http_response_code(400);echo json_encode(['error' => $result['message']]);}
}
?>
版权声明
本文仅代表作者观点,不代表杭州桑拿立场。
本文系作者授权发表,未经许可,不得转载。