테스트 사이트 - 개발 중인 베타 버전입니다

updateform.php 채택완료

웹랭귀지 2년 전 조회 1,335

updateform php 소스 좀 구해줘세요

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
c
2년 전
<?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT id, firstname, lastname FROM MyGuests"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo "id: " . $row["id"]. " - Name: " . $row["firstname"]. " " . $row["lastname"]. "<br>"; } } else { echo "0 results"; } $conn->close(); ?> <form action="update.php" method="post"> <div class="form-group"> <label for="id">ID:</label> <input type="text" class="form-control" id="id" name="id"> </div> <div class="form-group"> <label for="firstname">First Name:</label> <input type="text" class="form-control" id="firstname" name="firstname"> </div> <div class="form-group"> <label for="lastname">Last Name:</label> <input type="text" class="form-control" id="lastname" name="lastname"> </div> <button type="submit" class="btn btn-primary">Submit</button> </form>
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

c
2년 전
<html> <head> <title>Update Form</title> </head> <body> <form action="update.php" method="post"> <label for="name">Name:</label> <input type="text" name="name" /><br /> <label for="email">Email:</label> <input type="text" name="email" /><br /> <label for="phone">Phone:</label> <input type="text" name="phone" /><br /> <input type="submit" value="Update" /> </form> </body> </html>
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인