Jump to content

helf with if


ngreenwood6

Recommended Posts

I need some help with an if statement that I am trying to get accomplished. It's kind of confusing but bare with me here. I basically need an if statement inside of an if statement. It just keeps taking me to a blank screen.

 


if($session_username != $new_username)//session username is from their session and new username comes from a form
{
if ($username_from_db > 0) //if the username is in the database
{
echo "do this";
}
else
{
echo "do the rest of the first if statement";
}
}
else
{
process form
}

Any help is appreciated.


Link to comment
https://forums.phpfreaks.com/topic/118304-helf-with-if/
Share on other sites

I need some help with an if statement that I am trying to get accomplished. It's kind of confusing but bare with me here. I basically need an if statement inside of an if statement. It just keeps taking me to a blank screen.

 


if($session_username != $new_username)//session username is from their session and new username comes from a form
{
if ($username_from_db > 0) //if the username is in the database
{
echo "do this";
}
else
{
echo "do the rest of the first if statement";
}
}
else
{
process form
}

Any help is appreciated.

 

Are you sure your variables contain values?  Because there's no syntax error, other than 'process form' not being commented out.

Link to comment
https://forums.phpfreaks.com/topic/118304-helf-with-if/#findComment-608804
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.