Copy link to clipboard
Copied
I am trying to have my index.php make a choice as to what it shows. I would like it to open a new page (index1.php) at the "else" Is this possible? And if it is... can someone show me the code to use.
Condition 1 welcomes the user (done)
Condition 2 opens a log in page (need help)
Thank you for your time.
Copy link to clipboard
Copied
Yes it is possible.
If you paste your code or URL, i can tell you how.
Depending on where the "else" statement occurs in your code you may either use:
<meta http-equiv='refresh' content='0; URL=index1.php'> // Only works if no headers are sent already
or you just call different content in the same index.php (that's why we have a dynamic page)
As long as the html content is wedged between the <?php if... { ?> and <? } else { ?>" statements it'll do.
The alternative content then after the "else" and you're good.
Don't forget the closing brackets in the end - <? } ?>
cheers,
ff
Copy link to clipboard
Copied
Thanks fun factory for getting back to me on this. With much frustration and learning.
I have resolved my problem.
Initially because I could not get this to work header("Location: http://domain.com/index3.php"); I used include("index3.php"); That too led to issues so.. I figured out the problem with using the "header" command to jump to an alternate page and have it sort of working the way I want now
Thanks again for your offer to help
Find more inspiration, events, and resources on the new Adobe Community
Explore Now