SalesMarius Posted April 25, 2019 Report Share Posted April 25, 2019 on 1st course: Form validation with PHP and JavaScript, 3rd video where it begins PHP from validation it seems in the video form.php and contact.php are not connected ( no link from form.php to contact.php). It sais : Notice: undefined variable: error in /var/www/html on line and we have a number there I could cover the errors with if and isset but I doubt that the values will fave a null value next time I complete the form again. Please advice. I watched the videos all day long and could not figure out what I should do. Tried to put an include in form.php but no luck and contact.php has no "error" variable Quote Link to comment Share on other sites More sharing options...
administrator Posted April 25, 2019 Report Share Posted April 25, 2019 39 minutes ago, SalesMarius said: I could cover the errors with if and isset but I doubt that the values will fave a null value next time I complete the form again. .. Did you try? Quote Link to comment Share on other sites More sharing options...
SalesMarius Posted April 25, 2019 Author Report Share Posted April 25, 2019 (edited) 9 hours ago, administrator said: .. Did you try? 1. I tried it and the appearance errors are gone BUT 2.the main problem is if you type line by line all the lines in the video the program does not save the data entered when I disable javascript. 3. I tried the source code and I have same issues, maybe there is an error or php version is outdated? ( I use the latest version of php on a Ubuntu laptop) Edited April 25, 2019 by SalesMarius Quote Link to comment Share on other sites More sharing options...
administrator Posted April 25, 2019 Report Share Posted April 25, 2019 2 hours ago, SalesMarius said: .the main problem is if you type line by line all the lines in the video the program does not save the data entered when I disable javascript. So when the JavaScript is enabled, the data is saved? If so, that would suggest a JS issue, not PHP. Let me know! Quote Link to comment Share on other sites More sharing options...
SalesMarius Posted April 25, 2019 Author Report Share Posted April 25, 2019 (edited) Stef, please download your source code and check it again, maybe my php version is doing some other things than it should or maybe I have a virus on my laptop. Please let me know if it works fine. My php version is "PHP Version 7.2.15-0ubuntu0.18.04.2". My Ubuntu OS sends me messages every time I turn it on System Error or so. Please see the attached source file. (not modified at all) It seems I can`t reply to this post anymore... Edited April 25, 2019 by SalesMarius Quote Link to comment Share on other sites More sharing options...
administrator Posted April 25, 2019 Report Share Posted April 25, 2019 What is the error ... is it a PHP error you are getting and what is the error message? .... These details help people debug. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.