Jump to content
  • 0

redirection of pages within a module


talhaarif

Question

following are the images of a custom addon module for leave apply purpose. in 1st image there are two files with name of 1)leave_module 2)settings.php

and in 2nd image there is a front end of leave_module.php 

now what i want is to redirect myself to settings.php after clicking on settings button but i am not sure how to do it also i am new at it so kindly if anyone can help me through this

 

Thanks in advance,

Capture.thumb.PNG.9c3a789e0839bc997ba3f9b387838123.PNGCapture1.thumb.PNG.46b1637865d53c539fe184ee9b26cd95.PNG

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

WHMCS addon modules can only have one output function in the main module file (leave_module.php in your case). You could use a GET variable to determine what to display, combined with a switch statement:

switch($_GET['page'])
{
	case 'settings':
		// show settings
		break;

	default:
		// show home page
		break;
}

That is a very rudimental example, but it should point you in the right direction 🙂

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated