42: How to Display Error Messages Using PHP | PHP Tutorial | Learn PHP Programming

  Рет қаралды 188,695

Dani Krossing

Dani Krossing

Күн бұрын

Пікірлер: 231
@mirovaltonen6189
@mirovaltonen6189 7 жыл бұрын
Hi Daniel! I started learning PHP out of scratch and found your videos. I actually landed a job few months ago where PHP was essential, but I didn't have that much of knowledge about it yet. I've been doing other stuff meanwhile I've been learning PHP on my own through your videos. Long story short: All these videos have helped me to get more and more responsibility and harder tasks from our clients. Thank you for helping me succeed at my job and to make a living and actually do something that is really interesting and always challenging. I don't know how to express how it feels when a random guy on KZbin actually helped me to land a job and to succeed in it. Thank you, thank you, thank you.. :)
@Dani_Krossing
@Dani_Krossing 7 жыл бұрын
I am glad to see that you are getting something valuable from my lessons :)
@mirovaltonen6189
@mirovaltonen6189 7 жыл бұрын
Totally! Of course it's not everything I need to learn, but getting a frequent dose of basics explained clearly and telling stuff while doing it the same time is something not a lot of people want to do. The amount of people typing what they are doing on Notepad and showing that during the video makes the learning so displeasing that the upkeep and/or developing your professional competence gets even harder than it is.
@gabov7862
@gabov7862 6 жыл бұрын
you can express how you feel when a random guy on KZbin have helped you to get more businness by DONATING!! $Donate = $_PATREON "[Go to his website and donate]"; if ( ) { { you have gotten benefits from this material } else { donate on his Patreon account } exit ( );
@gosavva1
@gosavva1 6 жыл бұрын
hhhhhhh you're right
@navjeetbharti544
@navjeetbharti544 4 жыл бұрын
If you are earning right now, I just request you to support him on Patreon ❤. As he is not too good financially.
@iyaweosahon4868
@iyaweosahon4868 2 жыл бұрын
Thanks, your tutorials have been really helpful. Please drop one for shopping cart 🙏
@antonytome6590
@antonytome6590 4 жыл бұрын
thank you for doing this series again it's not that you did it terribly here its just you explained the html/css series way better
@georgemugala4830
@georgemugala4830 3 жыл бұрын
Daniel is gifted to explain. Complicated staff and makes them easy. Thanks alot man you de best
@kaustinn6817
@kaustinn6817 7 жыл бұрын
A awesome php tutorial would be a automated email, like when you sign up for something it says, "sending verification code to email" or something, that would be really helpful!
@skylark_doyle
@skylark_doyle 4 жыл бұрын
Thanks for everything dani....You are one of the best..... I get frustrated when learning php, sometimes I don't understand anything
@theparten
@theparten 4 жыл бұрын
Truly speaking...Daniel you tought me PHP from scratch
@jayantbarthwal4470
@jayantbarthwal4470 6 жыл бұрын
hey buddy , you are one of the best online teacher , thanks for these tutorials.
@Shomi_brat
@Shomi_brat 6 жыл бұрын
DUDE!You are gold!Thanks.
@sadiqahmed2617
@sadiqahmed2617 2 жыл бұрын
DANI!! you are just amazing... You have literally inspired me. I wish you happiness, success and peace of mind. :)
@badrmahfiuz8137
@badrmahfiuz8137 Жыл бұрын
رائع كان هذا مفيدا حقا wow it was so useful your fan from egy ARABIC FAN
@Instructors-tube
@Instructors-tube 3 жыл бұрын
Really you are teaching nice.
@rockon2278
@rockon2278 7 жыл бұрын
Hey, thanks for awesome tutorials. I've been watching the series and I'm learning fast. You should set up a donate button. you could earn some tips for sharing your knowledge. Thanks again. You Rock!
@Dani_Krossing
@Dani_Krossing 7 жыл бұрын
Thank you :) I have a donate button in my channel banner and on my patreon ;)
@TaidDiz
@TaidDiz 3 жыл бұрын
Well I don't know how, but the time you tested your code at 4:34 it didn't work for me, it just gets redirected to /includes/signup.inc.php.. Any ideas what could've happen?
@yongjung5433
@yongjung5433 6 жыл бұрын
Enjoyed this episode also! Thank you very much!
@sihyu4627
@sihyu4627 4 жыл бұрын
great explanation!!
@javericablanca4084
@javericablanca4084 4 жыл бұрын
Thanks alot mmtuts :) ,I will support you
@lawrencemichael5571
@lawrencemichael5571 4 жыл бұрын
Daniel, you are amazing.
@justinabuela8225
@justinabuela8225 5 жыл бұрын
Thanks for this tutorial bro, been having a hard time how to send error message back to previous page without having the log_error messages of sql showing up, thumbs up for ya
@mustafaameraljasim
@mustafaameraljasim 4 жыл бұрын
Such a wonderful explanation!
@tomclain1952
@tomclain1952 4 жыл бұрын
Hi, Daniel! Thank you for the lession! There is a nuance though. If you leave any of the fields empty (say, password) and click submit, it still erases all fields. Not the best UX. Could you kindly advise? Thanks!
@keanutype0896
@keanutype0896 2 жыл бұрын
Hi Dani. at 14:17 you said that the line 38 isset will get the data from url. how does the "if(!isset([$_GET['signup'])){" will get a data from URL? or is it automatic when you coded it like that? i check the other lines and i didnt saw you declare a "signup" variable so im confuse where the "signup" variable came from.
@Dani_Krossing
@Dani_Krossing 2 жыл бұрын
$_GET['signup'] grabs the data from the submit button from the previous page. The one that looked like this in the HTML form: Signup It is the "name" attribute we grab in the URL on the next page. 🙂 I think the reason you might be confused, is because the doesn't actually have a value. So technically, when we send it to the next page it will have no value in it, but that doesn't mean it doesn't get send anyways. It will just be "blank". But you have to remember, that we don't use it on the next page "because it has data in it"... But because we "just need it to exist" on the next page, to check if the form was submitted properly. So by inserting it into the !isset(), we check if the submitted button does not exist, in which case we send them away from our script since it shouldn't get run. It only exists so that we can check if the user got to our script legitimately. 🙂
@keanutype0896
@keanutype0896 2 жыл бұрын
@@Dani_Krossing Thanks! really clarified my confusion on that part! bit off topic: i wonder if you will or already have a video how to upload this file to a website online(ex: Github Page)? like uploading the HTML, PHP, CSS Javascript etc to website and make it online. so far from what i watched what we are doing is Local only, i wonder if it is possible to upload and make the entire file work as an actual website, then all inputs will be sent to your local/database? (like the front end/website is online but all inputs will be sent to your device/pc/laptop locally...instead of Cloud/online server) i could be asking a big question that seems wrong, haven't experience a working online website yet...
@gabrielfono844
@gabrielfono844 3 жыл бұрын
thanks so much.
@alwinshoots
@alwinshoots 4 жыл бұрын
Dude this is really helpful thanks for making this❤️❤️
@aymanmedhat9636
@aymanmedhat9636 6 жыл бұрын
Awesome tutorial bro!! i really liked it! thanks so much!
@CromwellBayon
@CromwellBayon 4 жыл бұрын
When the page is loaded you can actually get the URL parameters by simply using $_GET[param]. Then you can just do it like: if ($_GET['signup'] === 'empty') { echo 'You did not fill in all fields'; } or do it like; $message = $_GET['signup']; if ($message === 'empty') { echo 'You did not fill in all fields'; } ...and so on...
@lasithadulshan7357
@lasithadulshan7357 3 жыл бұрын
Wow .. Thank You..
@mig151991
@mig151991 3 жыл бұрын
Hi Daniel, I just wanted to say that your videos are so far the best I've ever seen on PHP! I've just started working with PHP and your videos helped me a lot, thanks :)) I have just one question and if you could answer I'll be grateful forever. Why the do you need to write --> value= " ' . $uid . '" ? I thought you had to use the dots only when you need to concatenate
@javierr5845
@javierr5845 6 жыл бұрын
very helpfull video !! your tuts are aweosome,but i have one Q that i can't solve from the last 3 months, i'm working with bootstrap and when i need to display an error message for example: The user account doesn't exist its any way to display that error box over another element in the page, for example over a jumbotron (bootstrap component), so in that way i dont push the other element down in the page, thanks in advance and please keep doing this tutorials there are very helpful
@tharunramachandran6070
@tharunramachandran6070 6 жыл бұрын
Instead of defining the variable inside the url and and accessing it in the signup.inc.php we could define the session variables and access the variables in the signup.inc.php. After inserting it into the database you could destroy the session right? correct me if I am wrong. The rest of the video where you prohibit deleting all the entered data and showing error only in the wrong fields is awesome! Thanks man.
@yudhisthirsingh8401
@yudhisthirsingh8401 6 жыл бұрын
Please make a course on Laravel. You are amazing
@itsYASHx
@itsYASHx 2 жыл бұрын
Thanks man
@llBestBoyll
@llBestBoyll 2 жыл бұрын
nice video but it's better to use sessions for storing data such as error messages or fields values
@ZionZiaTV
@ZionZiaTV Жыл бұрын
Wow amazing
@zLogitism
@zLogitism 5 жыл бұрын
truly helpful thank you so much!!
@remyreijven
@remyreijven 6 жыл бұрын
I don't get the point of using exit() within the if/elseif-statements. I assume that PHP already ignores irrelevant outcomes by itself and hence optimizing the performance. However, I would use a switch-statement for the $signupCheck validation, to avoid a lot of elseifs. In that case, using exit() would make more sense to me.
@subjectfrank
@subjectfrank 2 жыл бұрын
dani is lazy, he uses if/else statements all the time... do yourself a favor and stop watching this tutorial, it is a waste of time believe me.
@legendslein
@legendslein 7 жыл бұрын
when returning the values to the form isn't it easier to echo into the inputs value tag instead of echoing a whole new input line?
@ddfgrtsd
@ddfgrtsd 4 жыл бұрын
AWESOME!
@techexpert2010
@techexpert2010 7 жыл бұрын
Thank-you for the lessons. If possible make a tutorial that allows users to create pages like on Facebook. Looking forward to hearing from you soon.
@kUDRIish
@kUDRIish 6 жыл бұрын
Hey Daniel I went into problem after writing this code, so straight to the point, after writing information in my input and submitting I''m geting into ' Object not found error ', it's seems that my program somehow can't read the signup=empty etc. any suggestions? in either way I can't get back into my front page, but my URL error message works fine, any suggestion bro?
@jacksonbodra6450
@jacksonbodra6450 6 жыл бұрын
i am also having the same problem. ? have you solved it yet ?
@kUDRIish
@kUDRIish 5 жыл бұрын
Noup :(
@elliotowasp4077
@elliotowasp4077 6 жыл бұрын
Gracias!!!!! Muchas gracias!!!!!
@aleksandarkrasic8324
@aleksandarkrasic8324 6 жыл бұрын
I suppose we could write a switch statment with cases, and also breaks after every case instead of exit() ? :)
@Guess_who08
@Guess_who08 4 жыл бұрын
I agree but I guess it's for the sake of the tutorial
@job4810
@job4810 7 жыл бұрын
Hey brother, are you re-uploading the previous videos or these are newly updated ones? I followed up all your previous lessons and they were awesome. Thanks for the knowledge you share with us by the way!
@Dani_Krossing
@Dani_Krossing 7 жыл бұрын
Yes this tutorial was the final re-upload for the PHP course :)
@michaelysmaelfernandez4444
@michaelysmaelfernandez4444 5 жыл бұрын
just wanna ask, if you're going to refresh the page, does the error message will disappear?
@Jack-vv7zb
@Jack-vv7zb 4 жыл бұрын
no
@aquibb8140
@aquibb8140 6 жыл бұрын
Hey Dude, Which Editor you are using??
@clodpeachy7417
@clodpeachy7417 5 жыл бұрын
Atom
@johnsteward8325
@johnsteward8325 4 жыл бұрын
Thanks for the amazing content as always. I have a question. Returning the first name, last name, and username in the URL, doesn't that pose a security risk? I've always heard that you don't use get when submitting a form.
@guylemay1471
@guylemay1471 5 жыл бұрын
If at first it doesn't work... try... try... try again! Yeah... I got it now - the whole thing!
@andreaferrari9222
@andreaferrari9222 6 жыл бұрын
Hi Daniel! Congratulations for this series, is awesome! Where i can find the css do u use in this video?
@Dani_Krossing
@Dani_Krossing 6 жыл бұрын
Thank you :) I beleieve there is a link to the files on my Patreon in the video description.
@andreaferrari9222
@andreaferrari9222 6 жыл бұрын
Ok! will you do a series on laravel?
@zx8523
@zx8523 4 жыл бұрын
Thanks.. I think there a small issue witch is when user refreshing the page the parameters will stay in url and the message will showing!!
@malibaturhan
@malibaturhan 3 жыл бұрын
we use else if in this example as long as I know from other languages if we use else if that means the other ones are not true so if one of them is true then system will not read others, so it's not like that in php?
@antonytome6590
@antonytome6590 4 жыл бұрын
it went from 0 to a hundred real quick in the series
@franciscorey8123
@franciscorey8123 4 жыл бұрын
If anyone has the problem that you get the value in the url but the message doesn't show up, is because you have to style the classes in your .css file, for example: .success { height: 50px; color: green; } .error { height: 50px; color: red; }
@hiteshchoudhary3412
@hiteshchoudhary3412 7 жыл бұрын
Hey mm, please try to make laravel for beginners after this????
@twiceditor
@twiceditor 2 жыл бұрын
Do you have something like this but if you entered correctly, and sign up, the data will be save in another php file
@pkdchoy
@pkdchoy 5 жыл бұрын
Hi Daniel, I have encounter a problem when using method of getting the values from the url. First, when I entered some illegal name eg. %^, and then correct info for other fields, I would get an error message as expected, with the corrected fields filled in using the $_GET method from the url. But then when I resubmit the form with corrected details, eg. dave, with all other fields filled in correctly using the GET method from the url, I got the empty error message. What's happening?
@thabetmohd
@thabetmohd 4 жыл бұрын
Thanks Daniel for the video, one question though: if the user entered invalid email and a username already in use. The signup form will throw back the error as invalid email only as it will exit with the email error in the URL before running the username handler on the signup.inc.php and it will return the username into the signup form to the user. How can we let the signup.inc.php file check the user first and last name, email and username before returning the error and how to have a combination of errors before directing the user to the signup.php?
@Jack-vv7zb
@Jack-vv7zb 4 жыл бұрын
With the way that's shown in the video we cannot. But instead what we can do is create an array, and then for each error we encounter add a string of text to that array. Then at the end of the script we can check if the array is empty (it will be empty if there are no errors) and can continue to sign the user up. We can then also display this array on the sign up page, and it will output all of errors. I'd recommend reading through the code shown on this page to get a better understanding. codewithawa.com/posts/complete-user-registration-system-using-php-and-mysql-database
@toddbarry7303
@toddbarry7303 5 жыл бұрын
Interesting videos, just curious why you wouldn't just add the code value="" and so on to each form input, that way if the data is passed it will fill the form, if there is no data, the form will remain empty and use the placeholder text? Seems like a lot of extra lines of code that isn't needed?
@pianoLee-sx9dx
@pianoLee-sx9dx 6 жыл бұрын
Is there any other part of the page where you can display error handlers? I get an internal error when doing this on my other pages...
@xoxoo4877
@xoxoo4877 5 жыл бұрын
Hi, I really appreciate your tutorial series, I like it! I can see when working with PHP and passing parameters people always work with URL. So they add parameters directly to the URL. How can I pass parameters without using the URL? Because there are some parameters that I do not want to expose because of the potential vulnerabilities.
@ouiam2554
@ouiam2554 5 жыл бұрын
Use POST instead of GET in the attribute method of form
@hayatzee8830
@hayatzee8830 2 жыл бұрын
Hi Daniel! Very nice way to keep the input values after submission, However, is there a way to hide the values in the URL or a workaround to keep the values without using $_GET? thank you
@dav.R7
@dav.R7 2 жыл бұрын
@Hayat Zee You have to use Ajax
@hayatzee8830
@hayatzee8830 2 жыл бұрын
@@dav.R7 Thanks for your reply, I eventualy used the $_SESSION variables instead and kept the URL clean.
@Nicomegabits
@Nicomegabits 5 жыл бұрын
Thanks a lot +1 sub
@hamdimadi5477
@hamdimadi5477 6 жыл бұрын
My Brother i want to ask about when i create marksheet from the user i have one issue. In subject box i can write 0 to 100 number means restriction on text boxes.
@DirtyDan612
@DirtyDan612 6 жыл бұрын
Hi I followed along with the video and have all of my error messages working properly except it still enters the data into the database although the error message pops up. For example, if i leave all of the fields in the form black and click submit, the error message pops up but I get a blank entry. Or if i purposely add a username not meeting the preg_match specifications, the data is still entered into the database. How can I fix this? Thanks
@royalstranger
@royalstranger 3 жыл бұрын
How to find this -- *license your cms from "General Settings > License".  * it is hidden in view source and orginal file but visible in inspect and alert box also showing
@jedbisa8657
@jedbisa8657 4 жыл бұрын
Does the data still save into the database even though the data that the user was type is invalid? Coz i noticed in my current project that incorrect data still get save in my database? How can i avoid it?
@Gristy13
@Gristy13 4 жыл бұрын
Hi Dani, thanks ever so much for your courses... so easy to understand. I have a question though... How do I return radio button values back into the form as my radio buttons already have values assigned? eg q1.blah blah blah? Yes No N/A
@kadenskinner4575
@kadenskinner4575 3 жыл бұрын
Hi Daniel! You have a variable in your script called $_SERVER. What is this variable equal to?
@hassankrisht718
@hassankrisht718 5 жыл бұрын
why you dont use else if for checking errors
@rolandjethrosuyom478
@rolandjethrosuyom478 5 жыл бұрын
hey guys, good day! I'm stuck for almost 3 hours in the latter part of the video where the other input value will still remain if one of them got errors. and this is what I had found; this my first code: header('location: ../index.php?signup=email&first=$first&last=$last&uid=$uid'); then I tried this code and this worked: header("location: ../index.php?signup=email&first=$first&last=$last&uid=$uid"); Look at the quotation mark, I'd thought it is ok to use either " " or ' ' just to make you don't have any quotation mark inside your quotation mark. I hope you get what I mean.
@antipusrises
@antipusrises 4 жыл бұрын
I'm confused on the reasoning for adding the concatenation operators in addition to the single quotes around the php variables when inserting the data pulled from the GET method into the form field.
@The4tticuz
@The4tticuz 6 жыл бұрын
Since you're accessing your DB just if "submit" button was clicked, would it be better to die() and close() the connection when error was thrown?
@Dani_Krossing
@Dani_Krossing 6 жыл бұрын
die() does the exact same as exit(), except using exit() we can include an error message :) However when it comes to connecting to a database using mysqli we technically don't need to close the connection again because it is done automatically. Therefore the connection should only be manually closed to improve performance in regards to PHP and MySQL.
@The4tticuz
@The4tticuz 6 жыл бұрын
@@Dani_Krossing thanks for that quick reply!
@estudiar173
@estudiar173 Жыл бұрын
nice
@RakeshKumar-gh3ys
@RakeshKumar-gh3ys 6 жыл бұрын
I have a form in bootstrap modals. If I hit submit button on that form and want to return back a error message "email already exist" on back to same modal page. I will try your method, it works but error message not display on modal page, and whole page stuck. can u help on them if supply the whole code.
@jackywong941
@jackywong941 6 жыл бұрын
to avoid people type html code in username or password or....., u should use htmlentities($var)
@mykevin1122
@mykevin1122 7 жыл бұрын
You need to make sure that you include quotes followed by period in the header method for each variable header('Location: ../index.php?signup=email&first='.$first.'&last='.$last.'&uid='.$uid.'');
@Dani_Krossing
@Dani_Krossing 7 жыл бұрын
Nope :) Today it is optional whether or not to concatenate or directly insert variables into strings. I think they changed this sometime around PHP v5. But I will say that I usually prefer concatenating as well :)
@ushagovind1867
@ushagovind1867 6 жыл бұрын
mmtuts /
@jacksonbodra6450
@jacksonbodra6450 6 жыл бұрын
hello sir, it seems you have used so many if else condition which is very much confusing for me....in context of opening and closing of brackets. for my own ease of understanding may i use if.... elseif ?
@GerritforBazeja
@GerritforBazeja 5 жыл бұрын
I just downloaded your code (php42, video 42; How to display error....) and tested it on my localhost (Xampp). The first part, doesn't work on my Xampp. The form is working but always ends up with "index.php?signup=char" altough I used only an invalid Email. So it should say: "index.php?signup=email" !??
@nileshshetty2496
@nileshshetty2496 Жыл бұрын
can we just use HTML required for this or this is the best way?
@Dani_Krossing
@Dani_Krossing Жыл бұрын
NEVER use front end like HTML, CSS, or JavaScript for security. 🙂 You can easily remove the required attribute using the browsers build in developer tool. Btw I have a new 2023 PHP course on my channel, which is much better than this older one, and it explains this as well.
@dontbeafraid5313
@dontbeafraid5313 5 жыл бұрын
Hi Daniel, first of all big thanks for these great tutorials. I have a question. If the user fill in completely and correctly the form and submit it.. In the success message how can I customised it to be like this "Welcome Daniel, You are now registered" Daniel is the first name. I tried this code and it doesn't work.. echo "'Welcome '. $first. ', You are now registered' It says Undefined $first. What is the correct way for this. Thanks
@jojojuice29
@jojojuice29 4 жыл бұрын
how do we do this for empty radio button values?
@pianoLee-sx9dx
@pianoLee-sx9dx 6 жыл бұрын
Do you have a lesson on timestamp?
@GerritforBazeja
@GerritforBazeja 5 жыл бұрын
Same issue in the second part. what's going wrong ?? [I just downloaded your code (php42, video 42; How to display error....) and tested it on my localhost (Xampp). The first part, doesn't work on my Xampp. The form is working but always ends up with "index.php?signup=char" altough I used only an invalid Email. So it should say: "index.php?signup=email" !??]
@yuuz3151
@yuuz3151 6 жыл бұрын
Is it possible to move the error message? Like put each error under the field where it belongs to
@vishalsrivastava3656
@vishalsrivastava3656 6 жыл бұрын
yes
@zombiestrange6475
@zombiestrange6475 5 жыл бұрын
Why not use the Switch case in the second method?
@whynottoday833
@whynottoday833 6 жыл бұрын
Hi Daniel, Everything in my form is running correctly, but I the paragraph which was showing error and success in the first method is not showing the 2nd method, but all the other things are running absolutely fine. Please help me to identify this problem.
@raymondpcspangcheeseng7410
@raymondpcspangcheeseng7410 6 жыл бұрын
HELLO,ur problem is 2nd method cant working?
@bloodyfluff3436
@bloodyfluff3436 3 жыл бұрын
question, how do i make the signup button that if its successful it'll take me to the next page instead of staying there and saying its successful? i need help on that can anyone tell me what to do?
@himanshukanojiya3233
@himanshukanojiya3233 6 жыл бұрын
hello sir nice video , but i have one question :- after signup and entered invalid email i dont want (Fname ,Lname,username) show in URL. so for this what i have to do?
@SomebodyOutTh3re
@SomebodyOutTh3re 6 жыл бұрын
use POST method instead of GET
@irahg12
@irahg12 4 жыл бұрын
One problem is that the value doesnt save if using a textarea tag, maybe this is because value attribute works different with this tag? Anyone know how to fix...
@driilisertugul8320
@driilisertugul8320 3 жыл бұрын
Sir Sweet alert message show wrong page....e.g when i delete record. Record deleted but no message show when i click edit button alert show record deleted...how to solve it..
@vishalsrivastava3656
@vishalsrivastava3656 6 жыл бұрын
I think PHP should have a function or an dedicated file for login system, because it is very tedious job to write such a long code for small functionality. Error should be displayed using Java script at the time of entring the data (if some wrong data is inputed)
@ramonteuling672
@ramonteuling672 6 жыл бұрын
javascript can be bypassed since its front-end
@vishalsrivastava3656
@vishalsrivastava3656 6 жыл бұрын
@@ramonteuling672 thats true but some of the validation should be applied with javascript or php would slow down the server
@codewithmadrine7843
@codewithmadrine7843 2 жыл бұрын
actually keeping form values doesn't work since the form submits to another page which refreshes the page anyway. unless you click back to start from where you left(which the client aint gonna do ) otherwise you're not gonna get what you want most especially when you've validated and secured you're inputs using mysqli. I have spent 4hrs searching online for this cuz my inputs kept on returning empty inputs even when the error was displayed.
@hammedzisa7198
@hammedzisa7198 6 жыл бұрын
Hi Daniel, i know am probably commenting on these very late and i hope i get a reply to fix my problem... Whenever i click on the submit button while the forms are empty and even with the rest of the error codes, the error message doesn't show but instead show Object not found like these Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If you think this is a server error, please contact the webmaster. Error 404 localhost Apache/2.4.35 (Win32) OpenSSL/1.1.0i PHP/7.2.11 My paths files are correct but i can't seems to figure out what the problem is exactly... Thanks, pls help me out cause i started web dev recently
@sandeshbthapa2644
@sandeshbthapa2644 4 жыл бұрын
i might be late replying but inside signup.inc.php file you may have left an space between Location and : for eg" Location : url?....." whereas it should be "Location: url?... "
@ovidiublaga1
@ovidiublaga1 6 жыл бұрын
Hello, My data is not saved in the form when I submit with an empty field. I must write in all the fields again. I have done everything as you did. Coul you pleaase help? Thanks
@pianoLee-sx9dx
@pianoLee-sx9dx 6 жыл бұрын
Hello! Have you rectified your problem because I can't get mine to show too...
@djleisheng
@djleisheng 6 жыл бұрын
Your browser doesn't automatically save the fields. You must write the code to make this functionality.
@lusingarib
@lusingarib 6 жыл бұрын
Isn't it much more efficient checking the blank fields and the e-mail using java script since no data from server is required???
@Dani_Krossing
@Dani_Krossing 6 жыл бұрын
That is also a possibility, however all front-end languages such as HTML, CSS and JavaScript can be changed using the browsers build-in tool. So the users can just bypass JavaScript easily. PHP is serverside which means it can't be changed in the build-in tool.
@lusingarib
@lusingarib 6 жыл бұрын
Thank you
@naveenkr5992
@naveenkr5992 4 жыл бұрын
I made a errorlog session variable to store error message and echoed it in a div in main page
@mcstevendela1947
@mcstevendela1947 7 жыл бұрын
hey mmtuts ,why this code doesn't running on me $first = $_GET['first']; it enters on the if statement but when i'm passing the value on variable it doesn't i try to echo it but no output Hope you can help me :)
@frizlaw
@frizlaw 5 жыл бұрын
I've copied your code exactly for the signup.inc.php page, but when I press on the Signup button, I get the following error message: Parse error: syntax error, unexpected '^' in... . It won't accept the carat "^". in the second if statement. What am I doing wrong? How to correct it? My code: if (!preg_match(¨/^[a-zA-Z]*$/", $first) || !preg_match(¨/^[a-zA-Z]*$/", $last)) { header("Location: ../index.php?signup=char"); exit();
@royaltime3560
@royaltime3560 6 жыл бұрын
The error messages display in a different page ( or the form just wont load in )
@pianoLee-sx9dx
@pianoLee-sx9dx 6 жыл бұрын
I have corrected my signup2 file but now I am getting the following errors: Parse error: syntax error, unexpected 'echo' (T_ECHO) in C:\xampp\htdocs\phplessons\index6.php on line 26 Also, at line 33, you have elseif for success but shouldn't that just be a normal else? because it is the last thing to check?
@vishalsrivastava3656
@vishalsrivastava3656 6 жыл бұрын
you probably had missed to add ; (semi colon) in any statement just above the line where you are getting an error on line no. or a starting or closing { or }
@masekoprosper3189
@masekoprosper3189 5 жыл бұрын
You are a STAR mmtuts
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
HOW GOOD WAS PELÉ?
18:28
Gustavo Marques
Рет қаралды 3,6 МЛН
PHP File Uploads | The Complete Guide to Uploading Files Using PHP
19:28
Dave Hollingworth
Рет қаралды 47 М.