Jump to content

I want to do a case redirect...


ted_chou12

Recommended Posts

What I want to achieve is a redirection page, this page will be called the confirmation which handles all redirection from entry pages.
For example, if a person writes into his journal, then he will be directed to this page, and then this page will show something like "journal entry successful"
Another example would be editing his journal, so he will be directed to this confirmation page as well, but this time, the page shows "journal editing successful"
Despite they show the user different message, but they are all the same page, what I thought would achieve this is the case function, but I am very new to this, thanks for any help
Ted
Link to comment
https://forums.phpfreaks.com/topic/32206-i-want-to-do-a-case-redirect/
Share on other sites

You can achieve this with the very basic understanding of PHP. You can use case, or you can use if/else statements. Either will work....but the redirection itself makes use of the header() function.

[code]

<?php

  header("Location: index.php?action=postnew&notice=success");

?>[/code]

I won't write the actual code for you, since you need only some basic knowledge to do this...and I strongly feel you just need to put some effort into learning PHP (The basics at least).

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.