K
K
Kirill Gorelov2015-08-23 14:51:51
PHP
Kirill Gorelov, 2015-08-23 14:51:51

Editing/saving a post in php?

Hello.
How to implement such a simple function.
There is a php page.
I want to make it possible to edit fields for it. The fields themselves are a variable.
For example:
Enter a number: xxx
Where xxx is a number and it will then be used in the future.
I don’t know how to write this question in Google correctly. And accordingly there is no result.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Saboteur, 2015-08-23
@saboteur_kiev

Learn PHP Next.
Understand what an html form is, what GET and POST are, how to receive data.
In general, work with forms.

L
Lumore, 2015-08-23
@Lumore

Take this variable in get/post, process it and add it to the database, then just take this variable from the database and apply it wherever you want

A
Andrey Raboy, 2015-08-24
@raba

Very short

<form method="post"> 
   <input type="number" name="x">
   <input name="submit" type=submit value="Отправить"> 
</form>

<?php 
  $x =  $_POST['x']; 
  echo $x; // Выводим содержимое 
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question