Home » Php » Why i'm getting this error in a php form, i'm using mysql and phpmyadmin

Why i'm getting this error in a php form, i'm using mysql and phpmyadmin

Posted by: admin February 25, 2020 Leave a comment

Questions:

i’m trying to create a sign up page with HTML and PHP. I want to save the data in a database throght MySQL, i’m using XAMPP for Windows.

Why i’m getting this error? I’m declaring all of this variables.

HTML:

PHP:

Image of error:

Image

If i’m declaring this variables, why i get this error?
HTML works fine, and my project is inside of my workspace (htdocs folder).
Your help is greatly appreciated!

How to&Answers:

if you send data from index.php to script.php there will be no problem with variables. There will be a problem in your SQL query you must add ‘$variable’ to your sql:

Or if you want to run code in one file add if condition from start and end of php codes.

or