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_Krossing7 жыл бұрын
I am glad to see that you are getting something valuable from my lessons :)
@mirovaltonen61897 жыл бұрын
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.
@gabov78626 жыл бұрын
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 ( );
@gosavva16 жыл бұрын
hhhhhhh you're right
@navjeetbharti5444 жыл бұрын
If you are earning right now, I just request you to support him on Patreon ❤. As he is not too good financially.
@iyaweosahon48682 жыл бұрын
Thanks, your tutorials have been really helpful. Please drop one for shopping cart 🙏
@antonytome65904 жыл бұрын
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
@georgemugala48303 жыл бұрын
Daniel is gifted to explain. Complicated staff and makes them easy. Thanks alot man you de best
@kaustinn68177 жыл бұрын
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_doyle4 жыл бұрын
Thanks for everything dani....You are one of the best..... I get frustrated when learning php, sometimes I don't understand anything
@theparten4 жыл бұрын
Truly speaking...Daniel you tought me PHP from scratch
@jayantbarthwal44706 жыл бұрын
hey buddy , you are one of the best online teacher , thanks for these tutorials.
@Shomi_brat6 жыл бұрын
DUDE!You are gold!Thanks.
@sadiqahmed26172 жыл бұрын
DANI!! you are just amazing... You have literally inspired me. I wish you happiness, success and peace of mind. :)
@badrmahfiuz8137 Жыл бұрын
رائع كان هذا مفيدا حقا wow it was so useful your fan from egy ARABIC FAN
@Instructors-tube3 жыл бұрын
Really you are teaching nice.
@rockon22787 жыл бұрын
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_Krossing7 жыл бұрын
Thank you :) I have a donate button in my channel banner and on my patreon ;)
@TaidDiz3 жыл бұрын
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?
@yongjung54336 жыл бұрын
Enjoyed this episode also! Thank you very much!
@sihyu46274 жыл бұрын
great explanation!!
@javericablanca40844 жыл бұрын
Thanks alot mmtuts :) ,I will support you
@lawrencemichael55714 жыл бұрын
Daniel, you are amazing.
@justinabuela82255 жыл бұрын
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
@mustafaameraljasim4 жыл бұрын
Such a wonderful explanation!
@tomclain19524 жыл бұрын
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!
@keanutype08962 жыл бұрын
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_Krossing2 жыл бұрын
$_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. 🙂
@keanutype08962 жыл бұрын
@@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...
@gabrielfono8443 жыл бұрын
thanks so much.
@alwinshoots4 жыл бұрын
Dude this is really helpful thanks for making this❤️❤️
@aymanmedhat96366 жыл бұрын
Awesome tutorial bro!! i really liked it! thanks so much!
@CromwellBayon4 жыл бұрын
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...
@lasithadulshan73573 жыл бұрын
Wow .. Thank You..
@mig1519913 жыл бұрын
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
@javierr58456 жыл бұрын
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
@tharunramachandran60706 жыл бұрын
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.
@yudhisthirsingh84016 жыл бұрын
Please make a course on Laravel. You are amazing
@itsYASHx2 жыл бұрын
Thanks man
@llBestBoyll2 жыл бұрын
nice video but it's better to use sessions for storing data such as error messages or fields values
@ZionZiaTV Жыл бұрын
Wow amazing
@zLogitism5 жыл бұрын
truly helpful thank you so much!!
@remyreijven6 жыл бұрын
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.
@subjectfrank2 жыл бұрын
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.
@legendslein7 жыл бұрын
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?
@ddfgrtsd4 жыл бұрын
AWESOME!
@techexpert20107 жыл бұрын
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.
@kUDRIish6 жыл бұрын
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?
@jacksonbodra64506 жыл бұрын
i am also having the same problem. ? have you solved it yet ?
@kUDRIish5 жыл бұрын
Noup :(
@elliotowasp40776 жыл бұрын
Gracias!!!!! Muchas gracias!!!!!
@aleksandarkrasic83246 жыл бұрын
I suppose we could write a switch statment with cases, and also breaks after every case instead of exit() ? :)
@Guess_who084 жыл бұрын
I agree but I guess it's for the sake of the tutorial
@job48107 жыл бұрын
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_Krossing7 жыл бұрын
Yes this tutorial was the final re-upload for the PHP course :)
@michaelysmaelfernandez44445 жыл бұрын
just wanna ask, if you're going to refresh the page, does the error message will disappear?
@Jack-vv7zb4 жыл бұрын
no
@aquibb81406 жыл бұрын
Hey Dude, Which Editor you are using??
@clodpeachy74175 жыл бұрын
Atom
@johnsteward83254 жыл бұрын
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.
@guylemay14715 жыл бұрын
If at first it doesn't work... try... try... try again! Yeah... I got it now - the whole thing!
@andreaferrari92226 жыл бұрын
Hi Daniel! Congratulations for this series, is awesome! Where i can find the css do u use in this video?
@Dani_Krossing6 жыл бұрын
Thank you :) I beleieve there is a link to the files on my Patreon in the video description.
@andreaferrari92226 жыл бұрын
Ok! will you do a series on laravel?
@zx85234 жыл бұрын
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!!
@malibaturhan3 жыл бұрын
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?
@antonytome65904 жыл бұрын
it went from 0 to a hundred real quick in the series
@franciscorey81234 жыл бұрын
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; }
@hiteshchoudhary34127 жыл бұрын
Hey mm, please try to make laravel for beginners after this????
@twiceditor2 жыл бұрын
Do you have something like this but if you entered correctly, and sign up, the data will be save in another php file
@pkdchoy5 жыл бұрын
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?
@thabetmohd4 жыл бұрын
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-vv7zb4 жыл бұрын
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
@toddbarry73035 жыл бұрын
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-sx9dx6 жыл бұрын
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...
@xoxoo48775 жыл бұрын
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.
@ouiam25545 жыл бұрын
Use POST instead of GET in the attribute method of form
@hayatzee88302 жыл бұрын
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.R72 жыл бұрын
@Hayat Zee You have to use Ajax
@hayatzee88302 жыл бұрын
@@dav.R7 Thanks for your reply, I eventualy used the $_SESSION variables instead and kept the URL clean.
@Nicomegabits5 жыл бұрын
Thanks a lot +1 sub
@hamdimadi54776 жыл бұрын
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.
@DirtyDan6126 жыл бұрын
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
@royalstranger3 жыл бұрын
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
@jedbisa86574 жыл бұрын
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?
@Gristy134 жыл бұрын
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
@kadenskinner45753 жыл бұрын
Hi Daniel! You have a variable in your script called $_SERVER. What is this variable equal to?
@hassankrisht7185 жыл бұрын
why you dont use else if for checking errors
@rolandjethrosuyom4785 жыл бұрын
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.
@antipusrises4 жыл бұрын
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.
@The4tticuz6 жыл бұрын
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_Krossing6 жыл бұрын
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.
@The4tticuz6 жыл бұрын
@@Dani_Krossing thanks for that quick reply!
@estudiar173 Жыл бұрын
nice
@RakeshKumar-gh3ys6 жыл бұрын
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.
@jackywong9416 жыл бұрын
to avoid people type html code in username or password or....., u should use htmlentities($var)
@mykevin11227 жыл бұрын
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_Krossing7 жыл бұрын
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 :)
@ushagovind18676 жыл бұрын
mmtuts /
@jacksonbodra64506 жыл бұрын
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 ?
@GerritforBazeja5 жыл бұрын
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 Жыл бұрын
can we just use HTML required for this or this is the best way?
@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.
@dontbeafraid53135 жыл бұрын
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
@jojojuice294 жыл бұрын
how do we do this for empty radio button values?
@pianoLee-sx9dx6 жыл бұрын
Do you have a lesson on timestamp?
@GerritforBazeja5 жыл бұрын
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" !??]
@yuuz31516 жыл бұрын
Is it possible to move the error message? Like put each error under the field where it belongs to
@vishalsrivastava36566 жыл бұрын
yes
@zombiestrange64755 жыл бұрын
Why not use the Switch case in the second method?
@whynottoday8336 жыл бұрын
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.
@raymondpcspangcheeseng74106 жыл бұрын
HELLO,ur problem is 2nd method cant working?
@bloodyfluff34363 жыл бұрын
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?
@himanshukanojiya32336 жыл бұрын
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?
@SomebodyOutTh3re6 жыл бұрын
use POST method instead of GET
@irahg124 жыл бұрын
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...
@driilisertugul83203 жыл бұрын
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..
@vishalsrivastava36566 жыл бұрын
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)
@ramonteuling6726 жыл бұрын
javascript can be bypassed since its front-end
@vishalsrivastava36566 жыл бұрын
@@ramonteuling672 thats true but some of the validation should be applied with javascript or php would slow down the server
@codewithmadrine78432 жыл бұрын
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.
@hammedzisa71986 жыл бұрын
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
@sandeshbthapa26444 жыл бұрын
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?... "
@ovidiublaga16 жыл бұрын
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-sx9dx6 жыл бұрын
Hello! Have you rectified your problem because I can't get mine to show too...
@djleisheng6 жыл бұрын
Your browser doesn't automatically save the fields. You must write the code to make this functionality.
@lusingarib6 жыл бұрын
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_Krossing6 жыл бұрын
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.
@lusingarib6 жыл бұрын
Thank you
@naveenkr59924 жыл бұрын
I made a errorlog session variable to store error message and echoed it in a div in main page
@mcstevendela19477 жыл бұрын
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 :)
@frizlaw5 жыл бұрын
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();
@royaltime35606 жыл бұрын
The error messages display in a different page ( or the form just wont load in )
@pianoLee-sx9dx6 жыл бұрын
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?
@vishalsrivastava36566 жыл бұрын
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 }