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
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()

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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

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.