Beginner PHP Tutorial - 70 - Working with $_POST Variables

  Рет қаралды 95,680

thenewboston

thenewboston

Күн бұрын

Пікірлер: 42
@emojimovie2788
@emojimovie2788 6 жыл бұрын
Thanks to these tutorials and my book I managed to create an actual online dictionary. It isn't too professional, but it works.
@camelCaseFTW
@camelCaseFTW 11 жыл бұрын
way to incorporate real life situations into example - really helps :P
@capaneo
@capaneo 13 жыл бұрын
@LetsSpotIt Yes I think the the php block will be executed as soon as you load the page. But when the variable is not set the IF will skip everything. And since in your form action you put index.php then the page will be executed and loaded as soon as you submit the form. But this time the variables are set and so you will enter the IF block.
@capaneo
@capaneo 13 жыл бұрын
@ndm250 I think the isset is just trying to make sure the form is submitted before running the rest of the If statement in php. If you remove that line your PHP code will run as soon as you load the page. Im not sure but I think this is what its looking for
@jphilfiker
@jphilfiker 12 жыл бұрын
i am pretty sure he will cover security when he starts connecting to databases, myslq injection and html injection both needed to be checked, but its actually pretty easy.
@austinch
@austinch 13 жыл бұрын
@Muse94Muse so that the first time you visit the site it says "Please enter a password" and not "That is incorrect"
@sharksrinath
@sharksrinath 7 жыл бұрын
Is using action ='#' is same as action="index.php' where i'm using index.php which is the script where i'm using the form. Does using '#' create any problem? is it recommended?
@LetsSpotIt
@LetsSpotIt 13 жыл бұрын
@capaneo so when you put ?php block before form block, when submitting the form, will the file be executed again and the whole page refreshed?
@aryansaket6268
@aryansaket6268 7 жыл бұрын
ANOTHER GOOD THING IS THAT $_GET is better for signing up and $_POST is better for logging in.
@NikIvRu
@NikIvRu 12 жыл бұрын
sometimes you need both GET and POST in one form but that's more advanced.
@Killow
@Killow 8 жыл бұрын
I don't understand the use of the first line of code "if (isset($_POST['password'])) {... If I comment it out, it also works pretty well... What's the use?
@DanA-st2ed
@DanA-st2ed 8 жыл бұрын
it checks if the field named 'password' in the html form has been submitted correctly.
@Colstonewall
@Colstonewall 11 жыл бұрын
From roseindiaDOTnet: "Request of get method can be bookmarked, can be cached, are faster and have known consequences, so visiting them multiple times is not a problem."
@danutz0501
@danutz0501 12 жыл бұрын
You use get for navigation or a search engine. You use post for forms submisions. How to make a pagination system without a get variable for starting the limit in the sql query. Start using session for pagination or how :)))))))))))))))))
@RahilWazirAli
@RahilWazirAli 12 жыл бұрын
POST: variables that you declared in your php page will not be shown on address bar and good for security reasons. while GET: do and not good for security reason
@Brauseoimel
@Brauseoimel 12 жыл бұрын
He said that there has been an security tutorial relating to forms... did i skip it? does it exist? i cant find it :/
@Mental1993
@Mental1993 9 жыл бұрын
So, we could always use POST and never worry about security and staff?
@jovanjovanovic1408
@jovanjovanovic1408 9 жыл бұрын
Αρχαίος Έλλην Τρόλλερ approximately
@melanshrestha6331
@melanshrestha6331 8 жыл бұрын
where do we use GET instead of POST and vice versa?
@namelast-name616
@namelast-name616 8 жыл бұрын
GET would be good i think for search engine or something like that and POST most likely for any other thing
@daniyalyousaf160
@daniyalyousaf160 7 жыл бұрын
Where to use GET? Information sent from a form with the GET method is visible to everyone (all variable names and values are displayed in the URL). GET also has limits on the amount of information to send. The limitation is about 2000 characters. However, because the variables are displayed in the URL, it is possible to bookmark the page. This can be useful in some cases. GET may be used for sending non-sensitive data. Note: GET should NEVER be used for sending passwords or other sensitive information! When to use POST? Information sent from a form with the POST method is invisible to others (all names/values are embedded within the body of the HTTP request) and has no limits on the amount of information to send. Moreover POST supports advanced functionality such as support for multi-part binary input while uploading files to server. However, because the variables are not displayed in the URL, it is not possible to bookmark the page
@TheGuroguro12
@TheGuroguro12 8 жыл бұрын
Thank you very much
@TakingItCasual
@TakingItCasual 13 жыл бұрын
Why the dislike? I saw nothing wrong here, he even introduced a new input type; passwords.
@007hansen
@007hansen 6 жыл бұрын
He isn't using the function htmlspecialcharacters(input) to guard against hacking of your site. He's a hacker or didn't know.
@lindhe
@lindhe 13 жыл бұрын
Is this method secure for passwords, or was it just an example?
@swapnilsonsurkar2136
@swapnilsonsurkar2136 8 жыл бұрын
thankz a lot man
@HorrendouslyExremelyBad
@HorrendouslyExremelyBad 7 жыл бұрын
thanks
@johnmart09
@johnmart09 11 жыл бұрын
Easy as C#
@trebz2168
@trebz2168 6 жыл бұрын
nice
@007hansen
@007hansen 6 жыл бұрын
DO A BIG OVERLAY SAYING USE HTMLSPECIALCHARS FOR FORMs!
@lookintothesky123
@lookintothesky123 12 жыл бұрын
Yeah I prefer just using POST
@okmanek69
@okmanek69 11 жыл бұрын
7:10 wtf?
@sadnessinmylife
@sadnessinmylife 10 жыл бұрын
what?
@okmanek69
@okmanek69 10 жыл бұрын
sadnessinmylife then fucking do else. weird sentence.
@Itayst7
@Itayst7 10 жыл бұрын
okmanek okmanek lol i heard it too
@danibitt59
@danibitt59 10 жыл бұрын
therefore I can do else
@RebornXSoldier
@RebornXSoldier 13 жыл бұрын
@TakingItCasual Someone is jealous that we all get to learn this for free and they paid lots of $.
@Marcos10PT
@Marcos10PT 11 жыл бұрын
Why are there so many poor-english middle-easterns around here?
@pocong7ganu
@pocong7ganu 8 жыл бұрын
because they want to learn programming =D
Beginner PHP Tutorial - 71 - Working with Form Data
6:29
thenewboston
Рет қаралды 89 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,3 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Beginner PHP Tutorial - 73 - Setting PHP Sessions
7:44
thenewboston
Рет қаралды 191 М.
x86 Assembly: Hello World!
14:33
John Hammond
Рет қаралды 1,4 МЛН
The Absolute Best Intro to Monads For Software Engineers
15:12
Studying With Alex
Рет қаралды 678 М.
Beginner PHP Tutorial - 69 - Working with $_GET Variables
6:28
thenewboston
Рет қаралды 99 М.
Сборник Эксклюзивов 2024 - Уральские Пельмени
1:33:24
Уральские Пельмени
Рет қаралды 1,5 МЛН
Python Tutorial: Working with JSON Data using the json Module
20:34
Corey Schafer
Рет қаралды 1,1 МЛН
Real Madrid - Barcelona | Highlights | Final | Football | Spanish Super Cup
12:06
Beginner PHP Tutorial - 61 - $_SERVER Variables: Script Name
8:17
thenewboston
Рет қаралды 117 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН