我只是想知道是否可以嵌入本地主机 URL,例如
http://localhost/sampleproj/addsection.php?seatID=2
在二维码中,所以当扫描该代码时,这将在 Android/IPhone 设备上呈现?
我只是想知道是否可能。
谢谢你。
当然!转到 http://invx.com/ 并输入要编码的 URL。 QR 码作为链接并没有什么特别之处,只是阅读器应用程序会识别出您扫描的代码是一个 URL,并假设您打算访问该地址。
(但如果是
localhost
那么它只能在运行该网站的计算机上运行)
<?php include 'connect.php'; ?>
<!DOCTYPE html>
<html>
<head>
<title>
system pro
</title>
<body>
<center>
<div>
<form action="" method="POST" >
<input type="text" name="firstname" placeholder="firstname"> <br><br>
<input type="text" name="lastname" placeholder="lasttname"> <br><br>
<input type="text" name="address" placeholder="address"> <br><br>
<input type="submit" name="saved" value="save" >
<button> <a href="view.php">view</a></button>
</form>
</div>
</center>
<?php
if (isset($_POST['saved'])) {
$fsname=$_POST['firstname'];
$lsname=$_POST['lastname'];
$adress=$_POST['address'];
$query="INSERT INTO pro00 (fname,lname,address) VALUES('$fsname','$lsname','$adress')";
$data=mysqli_query($conn,$query);
if ($data) {
?>
<script type="text/javacript">
alert("data successfull insert");
</script>
<?php
}
else {
?>
<script type="text/javacript">
alert("Not record data");
</script>
<?php
}
}
?>
</body>
</head>
</html>