GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Php'rs need help real quick - Will PP you 20 bucks if u help me get this working (https://gfy.com/showthread.php?t=452437)

BoNgHiTtA 04-05-2005 01:09 PM

Php'rs need help real quick - Will PP you 20 bucks if u help me get this working
 
Ok, trying to format a URL:

&memid=[$_SESSION["rid"]]&email=" +eml;


When I do this, it doesn't seem to want to pickup rid from our system. Actually I am thinking I have this formatted wrong.

I know I can use this:

<?=htmlspecialchars[$_SESSION["rid"]]?>

But I don't think it works in URLs.

Any suggestions? Ill pp anyone who can help me get it working 20 bucks for the trouble

onlyreal 04-05-2005 01:16 PM

you can not use session in url(as php cannot process session in browsers address bar)

u need to a put like something in to the start of page(page u will go with url)

if(Session[id]hahahaha"bla"){
do this
}

or u need to put session in to a variable and send this variable in url instead of session


hahaha ='= (remove ')

BoNgHiTtA 04-05-2005 01:19 PM

K let me try that and see what comes from it. Whats ur Paypal addy if I can get it working :)

onlyreal 04-05-2005 01:20 PM

[email protected]

come to my icq 20196017

i will get it work in a second:)

BoNgHiTtA 04-05-2005 02:20 PM

Fantastic job! Thanks again man!!

rickholio 04-05-2005 02:20 PM

Quote:

Originally Posted by BoNgHiTtA
Ok, trying to format a URL:

&memid=[$_SESSION["rid"]]&email=" +eml;


When I do this, it doesn't seem to want to pickup rid from our system. Actually I am thinking I have this formatted wrong.

I know I can use this:

<?=htmlspecialchars[$_SESSION["rid"]]?>

But I don't think it works in URLs.

Any suggestions? Ill pp anyone who can help me get it working 20 bucks for the trouble

Try something like this:
Code:

<?
// Load up params with whatever parameters you need
  $params[rid] = $_SESSION[id];
  $params[email] = $_SESSION[email];
  $params[whatever] = "whatever";

// Convert the params array into a query string
  $parmstring = '';
  foreach($params as $k => $v) {
    if($parmstring!="") $parmstring .= "&";
    $parmstring .= "$k=".urlencode($v);
  }
?>
<A HREF='http://some.url.com/foo.php?<?= $parmstring ?>'>

HTH.


All times are GMT -7. The time now is 01:06 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123