Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP unwanted redirection.
Old 04-21-2005, 01:08 PM PHP unwanted redirection.
Junior Talker

Posts: 3
Trades: 0
i'm running a e-commerce php script but whenever i try to access a sub - category from out side eg. "http://ttconnex.com/product.php?p=183" it always redirects me to the front page at www.ttconnex.com.

i really need help with this.

contact me: eyelovegirz@yahoo.com
godson7 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-21-2005, 01:37 PM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
you may get more response if you just post the code associated with the page in question.
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 04-21-2005, 02:41 PM
Junior Talker

Posts: 3
Trades: 0
actually it's all the links with product.
http://www.ttconnex.com/products.php?p=(numeric variable)

all of them give the same problem. what ever the product is.
godson7 is offline
Reply With Quote
View Public Profile
 
Old 04-21-2005, 05:53 PM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
yep, so post products.php
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 04-21-2005, 06:51 PM
Junior Talker

Posts: 3
Trades: 0
if this helps then here it is:

Product.php
<?php
require_once("_functions.php");
if (isset($_GET['print']))
echo showTemplate("{$config['template']}/print.html");
else
echo showTemplate("{$config['template']}/index.html");
?>

_functions.php

<?php
##############################################
## cpCommerce by Matthew Wilkin ##
## ╘ Copyright 2002. All Rights Reserved. ##
##############################################
## Do Not Edit Beyond This Point ##
##############################################
// Start MySQL and Sessions
session_start();

// PHP Settings
@error_reporting(E_ALL ^ E_NOTICE);
@ini_set("register_globals",0);

## Protect prefix vulnerability
if (strpos($_SERVER['PHP_SELF'],"_functions.php") !== false)
header("Location: http://{$_SERVER['HTTP_HOST']}");
if (!isset($prefix) || isset($_REQUEST['prefix'])) $prefix = "";

## Include Configuration Files
require_once("{$prefix}_config.php");
require_once("{$prefix}_gateways.php");
require_once("{$prefix}{$config['up2date_language']}");

// Session Values
if (!isset($_SESSION['cpID'])) $_SESSION['cpID'] = "guest";
if (!isset($_SESSION['cpEmail'])) $_SESSION['cpEmail'] = "";
if (!isset($_SESSION['cpPass'])) $_SESSION['cpPass'] = "";
if (!isset($_SESSION['cpItems'])) $_SESSION['cpItems'] = "";
if (!isset($_SESSION['cpQuantity'])) $_SESSION['cpQuantity'] = "";
if (!isset($_SESSION['cpPaymentInfo'])) $_SESSION['cpPaymentInfo'] = array();
if (!isset($_SESSION['cpLanguage'])) $_SESSION['cpLanguage'] = "{$config['language']}";
if (!isset($_SESSION['cpTemplate'])) $_SESSION['cpTemplate'] = "{$config['template']}";
if ($_SESSION['cpID'] == "") $_SESSION['cpID'] = "guest";

mysql_connect($config['host'],$config['user'],$config['pass']);
mysql_select_db($config['database']);

// On Page load functions
require_once("functions/onloads.func.php");

## Include Other Files
require_once("{$prefix}_variables.php");
require_once("{$prefix}_emails.php");

// Addon Function Files


// Older PHP Versions
if (phpversion() < "4.0.6" && isset($HTTP_POST_VARS))
$_POST = ($HTTP_POST_VARS);
if (phpversion() < "4.0.6" && isset($HTTP_GET_VARS))
$_GET = ($HTTP_GET_VARS);
if (phpversion() < "4.0.6" && isset($HTTP_COOKIE_VARS))
$_COOKIE = ($HTTP_COOKIE_VARS);
if (phpversion() < "4.0.6" && isset($HTTP_SERVER_VARS))
$_SERVER = ($HTTP_SERVER_VARS);
if (phpversion() < "4.0.6" && isset($HTTP_POST_FILES))
$_FILES = ($HTTP_POST_FILES);
if (phpversion() < "4.0.6" && isset($HTTP_SESSION_VARS))
$_SESSION = ($HTTP_SESSION_VARS);

// Needed Variables
$config['error'] = "";
$product = "";
$productinfo = "";
$category = "";
$categoryinfo = "";
$manufacturer = "";
$manufacturerinfo = "";

// Required Functions
require_once("functions/methods.func.php");
require_once("functions/currenc.func.php");
require_once("functions/templat.func.php");
require_once("functions/metatag.func.php");
require_once("functions/account.func.php");
require_once("functions/shpcart.func.php");
require_once("functions/subcats.func.php");

// Do Actions
if (isset($_GET['action'])) $_POST['action'] = $_GET['action'];
if (isset($_POST['submit']) || isset($_POST['action']))
if (isset($_POST['action']) && file_exists("actions/{$_POST['action']}.act.php"))
require_once("actions/{$_POST['action']}.act.php");

// Logout
if (isset($_GET['logout'])) {
checkSession("","");
header("Location: {$config['siteaddress']}{$config['maindir']}".substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],"/")+1));
}

// Redirect if necessary
if (isset($_POST['action'])) {
if (isset($_POST['m']))
header("Location: {$config['siteaddress']}{$config['maindir']}" . substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],"/")+1) .
"?m={$_POST['m']}");
else
header("Location: {$config['siteaddress']}{$config['maindir']}".substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],"/")+1));
}
?>
godson7 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP unwanted redirection.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.47857 seconds with 12 queries