C
C
Chesterfield252021-07-12 17:28:24
PHP
Chesterfield25, 2021-07-12 17:28:24

How to create a page in php?

Please tell me how to create a page in php? Specifically, what I need, I have a form on the site with which I add data to the database. What I need is that when I wrote down all the fields in the form and clicked add, in addition to the fact that all the data was entered into the database, a separate page was created on which this data was displayed that I added to the database.

Here is the request that sends the data

$title = $_POST['name'];
$url = $_POST['url'];
$get_id_type = $_GET['id'];
$select_1 = $_POST['select_1'];
$select_2 = $_POST['select_2'];
$sql = ("INSERT INTO xf_type (title, url,select_1, select_2) VALUES (?,?,?,?)");

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lex85, 2021-07-22
@Lex85

You need to create two pages.
On the first page, display a list of records loaded into the database with links to the second page.
On the second dynamically display, depending on the passed parameter (for example, id or any other unique field of the database), display the data of a particular record.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question