Question:
In PHP Undefined index: variable name; error occured during submiting a form.. any body help me?
Ramkumar
2011-08-02 23:39:13 UTC
In PHP Undefined index: variable name; error occured during submiting a form.. I am use to submit my form in localhost so that undefined error occured and shows in my result page.. I dont want to show it in my result page.. any body help me??
Three answers:
Silent
2011-08-02 23:59:04 UTC
Without being able to see your code, there's very little anyone can do to help you. Please post your code at http://www.pastebin.com and include the link to it here.
?
2016-05-15 06:56:36 UTC
It's good practice when you assign php variables to make sure they have a value, so that if they don't have a value you can direct people back to the main page with a specific error message or check if a value has been added. use the isset command, like this: if (isset($_POST['txtP']){ $w=$_POST['txtP']; echo $w; } else { echo "You need to fill out the form."; //can be any error message. }
anonymous
2011-08-03 00:16:22 UTC
this error is displayed for many errors. show your code pls..


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...