A
A
Andrew2019-09-23 15:49:13
PHP
Andrew, 2019-09-23 15:49:13

How to make a page with saved data in php, OOP?

Hi, now I'm taking courses on Web programming and now I don't understand how to work with OOP and some other points. Can you suggest websites for information? And how can I make a page with saved data through oop?
There is such a code with a session that transfers to another page if everything is ok, the other page is empty, you need to write using php and oop to open a page with saved data (login password name height weight) and they are either entered in authorization by a person or by a hard binding (the type itself registered the data, and then just so that they would be highlighted) how to register that:

<?php
session_start();
if($_SESSION["is_auth"] == true) {
header("location: not.php");
exit();
}
if (isset ($_POST["email"]) && ($_POST["password"])) {
if ($_POST["email"] == "[email protected]" && $_POST["password"] == "sshaggy.a") {
header("location: not.php");
$_SESSION["is_auth"] = true;
} else {
echo "not";
}
}



?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>login</title>
</head>
<body>
<form action="php3.php" method="post">
<div>REGISTRATION</div>
<p> Mail <input type="email" name="email"></p>
<p> Password<input type="password" name="password"></p>
<p> Name<input type="text" name="name"></p>
<p> Size<input type="text" name="size"></p>
<p> Age<input type="text" name="age"></p>
<input type="submit">
</form>

</body>
</html>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Northern Lights, 2019-09-23
@php666

Now I am studying in web programming courses and now I don’t understand how to work with OOP at all
you will come to OOP on your own, but after some time of practice (a year or two). When you don't need courses to write in the language. It is useless to explain anything to you now. And you don't need to. Learn to write code first without self-written classes.
And how can I make a page with saved data through oop?
This is the topic, if not of the whole book, then of a large section in the book.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question