Jump to content

how to do this?


aebstract

Recommended Posts

I'm trying to write some sort of if statement, something like this:

 

I have some text I want to display, under certain circumstances. If submit is not set, the text is displayed. This isn't a problem,

however I also want it to display when submit is set, but only if $problem is also set. How can I make it so that it displays under both situations? If submit is set and problem is not set, it shouldn't display the text.

Link to comment
Share on other sites

I think I tried both methods above, the problems I found with them are:

themistral, that is making sure both post and problem are set. I want it to display when submit is not set also.

timmy0320, you can't get to your inside statements if submit isn't set. If it isn't set, it should still display the text. I noticed your else but here is whats going on.

 

There is a process happening above all of this. There is a form at the bottom of the page, if the form is submitted and there are no problems in the processes at the top, then the form won't be displayed, instead it will be a form of a success message. Problem here is, I put this success message up in that process code I mentioned above. All I need to do to get this to work correctly is make it check for the situation of either if submit is not set or if it is, then problem must be set also. Under those two circumstances, the form at the bottom should be shown.

Link to comment
Share on other sites

You contridict yourself.  First you say Timmy's won't work because Submit isn't set, yet then you say you only want to check $problem if Submit is set.

 

So what do you want?

 

I think I tried both methods above, the problems I found with them are:

themistral, that is making sure both post and problem are set. I want it to display when submit is not set also.

timmy0320, you can't get to your inside statements if submit isn't set. If it isn't set, it should still display the text. I noticed your else but here is whats going on.

 

There is a process happening above all of this. There is a form at the bottom of the page, if the form is submitted and there are no problems in the processes at the top, then the form won't be displayed, instead it will be a form of a success message. Problem here is, I put this success message up in that process code I mentioned above. All I need to do to get this to work correctly is make it check for the situation of either if submit is not set or if it is, then problem must be set also. Under those two circumstances, the form at the bottom should be shown.

Link to comment
Share on other sites

So I can go with method, but I just have to insert my text twice, both in to the if problem is set and in to the else, cause its gonna be the same information in both cases. It will work, but I was seeing if there was a more straight way to do it, so you don't have to insert the info twice.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.