This question already has an answer here:
I just done with coding of my recipe form where user will fill it and these data will go to database but i don't know what is mistake in my code ,
you guys can see in snapshot error plus my codes
</div>
This question already has an answer here:
I just done with coding of my recipe form where user will fill it and these data will go to database but i don't know what is mistake in my code ,
you guys can see in snapshot error plus my codes
</div>
Without the HTML code posted, I can only speculate that your names in the HMTL form differs from what you expect to receive.
Another possibility is that since you are using $_REQUEST
, then there is a setting in your PHP.INI that stops your GET or POST or all submitted data from being registered in the array. If you use method="post"
in your <form>
then you can use $_POST
to access data, rather than $_REQUEST
.
The error regarding real_escape
is just saying that you forgot the mysqli_
at the front of the function name when calling it. I would however strongly recommend that you stop using mysqli and instead take a look at PDO with prepared statements. The only escaping you need to worry about then is making sure you are not vulnerable to XSS, but that is not done with mysqli_real_escape...
, but rather with htmlentities
.