Jump to content

Redirect to same page after login..


rusty1001

Recommended Posts

Hi

 

I have login box running across all pages for login, template based.. so the script is module based ..

 

on login script page

 

  tep_redirect(tep_href_link(FILENAME_DEFAULT)); and it goes to index.php  -- I want the filename to go the same page after login....    ie stay on the same page... how can I define this ?  I thought I could define a _DEFAULT2 and define that where the filenames.php are located... what is the script for redirecting to the self/ same page in php..tried a few things but no luck,,,should be pretty simple? thanks

 

Russell

noob (can you tell?)

Link to comment
https://forums.phpfreaks.com/topic/78335-redirect-to-same-page-after-login/
Share on other sites

if you want to do some stuff and then redirect then do something like that

 

<?php
ob_start();
session_start();

header("Cache-control: private"); // IE 6 Fix. 
$_SESSION['card'] = $_POST['card'];
$_SESSION['dateF'] = $_POST['dateF'];
$_SESSION['dateT']  = $_POST['dateT'];
$_SESSION['hotelkey'] = $_POST['hotel'];
$_SESSION['tprice'] = $_POST['price'];
$_SESSION['roomkey'] = $_POST['roomkey'];
$_SESSION['cvs'] = $_POST['cvs'];
$_SESSION['name'] = $_POST['nameVisitor'];
echo "i write something and then i redirect";
// BANK redirection to the below link
header("Location: http://www.myfoxnet.com/project/paymentok.php5");
ob_flush();
?>

 

just pay attention to ob_start() and ob_flush()

 

the $_session variables are just an example of copy paste of my code... you dont need to use them :P just use the ob_xxx()

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.