Jump to content

FireFox removed space coding %20 !! What's next


egturnkey

Recommended Posts

Hello Dear Friends,

 

My website was working fine but after firefox 3.5 released i found it not coding spaces to %20 as it used to be hence

 

my problem as following :-

 

1- that url on IE works fine

 

http://localhost/genpaypage.php?type=1&desc=Website%20Name%20-%20month%20:%20%20months&amount=5.00&tmpmemberID=3&paymentID=3

 

where the genpaypage.php will send me to paypal ..ect

 

2- Not working on Firefox cause it not coding space to %20 and leave only spaces  :chomp:  hence the link not working

 

http://localhost/genpaypage.php?type=1&desc=Website Name - month: 2 months&amount=5.00&tmpmemberID=3&paymentID=3

 

 

How then can i makes a changes in genpaypage.php to solve that problem >>> here is its code

 

( idea of the script, user register.php then confirm.php then it generate a payment link at genpaypage.php )

 

<?php
session_start();
include_once('common/common.php');

DB_connect();
if ($_SERVER['REQUEST_METHOD'] == "GET") {
$type = $_GET['type'];
$desc = $_GET['desc'];
$amount = $_GET['amount'];
if ($_GET['tmpmemberID'] != "")
	$tmpmemberID = $_GET['tmpmemberID'];
if ($_GET['memberID'] != "")
	$memberID = $_GET['memberID'];
if ($_GET['cartID'] != "")
	$cartID = $_GET['cartID'];
$membership = $_GET['membership'];
$paymentID = $_GET['paymentID'];
$creation_date = date("YmdHis");

$inserttrans = true;
if ($_SESSION['transID'] != "") { // session variable for transaction ID found
	$SQL = "DELETE FROM transaction WHERE transID=".$_SESSION['transID'];
	$result = mysql_query($SQL);
} 

$IP = getip();
$ISP = gethostbyaddr($_SERVER['REMOTE_ADDR']);
if ($inserttrans) {

	if ($_GET['type'] == 1) { // membership subscription transaction
		$SQL = "INSERT INTO transaction VALUES(null, $paymentID, 0, $type, 0, $tmpmemberID, 0, 0, $amount, '', '$IP', '$ISP', $creation_date)";

	} else if ($_GET['type'] == 2) { // membership subscription renewal transaction
		$SQL = "INSERT INTO transaction VALUES(null, $paymentID, 0, $type, $membership, 0, $memberID, 0, $amount, '', '$IP', '$ISP', $creation_date)";

	} else if ($_GET['type'] == 3) { // cart purchase transaction
		$SQL = "INSERT INTO transaction VALUES(null, $paymentID, 0, $type, 0, 0, 0, $cartID, $amount, '', '$IP', '$ISP', $creation_date)";

	}
	$result = mysql_query($SQL);
	// set session variables
	$_SESSION['transID'] = mysql_insert_id();
	$transID = $_SESSION['transID'];

	// retrieve payment processor details
	$SQL = "SELECT * FROM payment WHERE paymentID=$paymentID";
	$result = mysql_query($SQL);
	if ($paymentrow = mysql_fetch_array($result))
		$items = split('[:]', $paymentrow['paymentConfig']);


	$path = "http://".WEB_DOMAIN."/";
	if ($_GET['type'] == 1) {
		$return_url = $path.FILE_INDEX."?action=signupsuccess";
		$cancel_url = $path.FILE_INDEX."?action=signupfail";
	} else if ($_GET['type'] == 2) {
		$return_url = $path.FILE_INDEX."?action=renewsuccess";
		$cancel_url = $path.FILE_INDEX."?action=renewfail";
	} else if ($_GET['type'] == 3) {
		$return_url = $path.FILE_INDEX."?action=salereturn";
		$cancel_url = $path.FILE_INDEX."?action=salefail";
	}

	$SQL = "SELECT * FROM payment WHERE paymentID=$paymentID";
	$result = mysql_query($SQL);
	if ($row = mysql_fetch_array($result))
		$notify_url = $path.$row['paymentName'].".php";

	switch ($paymentID) {
		case 3: // Paypal
			echo '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="paypal">';
			echo '<input type="hidden" name="business" value="'.$items[0].'">';
			echo '<input type="hidden" name="currency_code" value="'.$items[1].'">';
			echo '<input type="hidden" name="cmd" value="_xclick">';
			echo '<input type="hidden" name="notify_url" value="'.$notify_url.'">';
			echo '<input type="hidden" name="return" value="'.$return_url.'">';
			echo '<input type="hidden" name="cancel_return" value="'.$cancel_url.'">';
			echo '<input type="hidden" name="item_name" value="'.$desc.'">';
			echo '<input type="hidden" name="item_number" value="'.$transID.'">';
			echo '<input type="hidden" name="amount" value="'.$amount.'">';
			echo '</form>';
			echo '<script>document.paypal.submit()</script>';
			break;

	}	
}
}
DB_close();

?>

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.