K
K
kiril9012015-12-21 13:28:58
PHP
kiril901, 2015-12-21 13:28:58

Adding information to the database, what's the best way?

there is a form that I fill out at the click of a button, it constantly displays new data below and below, but how can I do to change the data? here is my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Selected User</title>
</head>

<body>
<?php
require 'connect.php';

$sql_select = "SELECT * FROM users";
$result = mysql_query($sql_select);
$row = mysql_fetch_array($result);

do
{
  printf("<p>Пользователь: " .$row['first_name'] . " " .$row['last_name'] ."</p> 
  <p><i>Контактные данные</i></p><p>E-mail: " .$row['email'] . "</p><p>Facebook: " .$row['facebook'] . "</p>---------<br/>"
  );
}
while($row = mysql_fetch_array($result));


?>
<a href="search_user.html">Вернуться к поиску</a><br/><br/>
<a href="info_form.html">Добавить пользователя</a>
</body>
</html>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question