Jump to content

redirect screen problem


AviNahum

Recommended Posts

it's my first time i using OOP, and it's my first time i working on system that i totally separator between the HTML and PHP codes.

so i trying to make a redirect screen that redirect the user to the index after registration (only for example)

but when i print the redirect i dont want that print other parts... for example, this is my HTML code:

<html>
<body>
some text
</body>
</html>

 

i want it clear this totally!

and print the redirect!

this is my function:

    function redirect_screen($text, $url)
    {
    	global $gvars, $skin_global, $DB;
          	
    	$htm = $skin_global->Redirect($text, $url);

    	echo $htm;
    	exit;
    }

 

and this is the "Redirect" function (the html):

function Redirect($Text, $Url) {
global $gvars;
return <<<HTML
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1255" /> 
<meta http-equiv='refresh' content='2; url=$Url' />
</head>
<body>
<table width='30%' height='85%' align='center' dir="rtl" style="border:1px solid #dbdbdb;">
<tr>
  <td valign='middle' align="right">
<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" dir="rtl">
<tr><td>
	<table class="good_m_tile" align="right" width="100%" border="0" cellpadding="0" cellspacing="0" dir="rtl"><tr><td align="right" width="100%">thanks</td></tr></table>
</td></tr>
<tr><td>
	<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" dir="rtl">
		<tr>
			<td align="right" class="linkt">
				$Text<br />
				you are transfor<br /><br />
				(<a href='$Url'>some text</a>)
			</td>
		</tr>
	</table>
</td></tr>
</table>
  </td>
</tr>
</table>
</body>
</html>
HTML;
}

 

as you can see it's print the HTML tag again...

there is some function that totally clear all browser data?

 

[sorry for poor English, i'm not english speaker :|]

Link to comment
https://forums.phpfreaks.com/topic/154004-redirect-screen-problem/
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.