Answer the question
In order to leave comments, you need to log in
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
Learn PHP Next.
Understand what an html form is, what GET and POST are, how to receive data.
In general, work with forms.
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
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 questionAsk a Question
731 491 924 answers to any question