I am mucking around with PHP and MySqli trying to create a register form.
Usually you can check if the fields have not been field out by doing something like:
What I am trying to do is create a switch statement, in the actual switch I want the cases to be $username, $password, $email etc.
I vision it something like this:
The problem is that !isset is completely useless in this case unless i do something like !isset(VARIABLE) and then make the cases = the variable but I do not know how to do that.
Sorry if I explained it bad but it is confusing me aswell XD
Usually you can check if the fields have not been field out by doing something like:
Code:
if(!isset($_POST[???])) {
- Warning or what ever -
}
What I am trying to do is create a switch statement, in the actual switch I want the cases to be $username, $password, $email etc.
I vision it something like this:
Code:
switch(!isset) {
case $username:
echo "Please fill out....";
break;
---- repeat for other fields ----
}
The problem is that !isset is completely useless in this case unless i do something like !isset(VARIABLE) and then make the cases = the variable but I do not know how to do that.
Sorry if I explained it bad but it is confusing me aswell XD