Jump to content


Photo

Problem passing variables via url


  • Please log in to reply
1 reply to this topic

#1 cnl83

cnl83
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 22 March 2006 - 08:42 PM

Im having issues passing my variables via url.

Here is my code in the main php file..
session_start(); 
$sid = $_SESSION['name'];

?>

later on in the page

<a href="https://dataencrypted.com/scormsource/classes/access_user/read.php?<?=$sid?>

and that works cause when you click the link it renders my name like this
[a href=\"https://dataencrypted.com/scormsource/classes/access_user/read.php?Chad%20Landry\" target=\"_blank\"]https://dataencrypted.com/scormsource/class...p?Chad%20Landry[/a]

My code in read.php is

session_start(); 

$val = $_GET['sid']; 

print "HI: $val"; 

?>
I cannot get it to print $val

Thanks in advnaced[code=auto:0][code=auto:0]

#2 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 22 March 2006 - 08:47 PM

sid is the name of the value. if you do this it will work

[a href=\"https://dataencrypted.com/scormsource/class...p?sid=Chad%20Landry\" target=\"_blank\"]https://dataencrypted.com/scormsource/class...d=Chad%20Landry[/a]

Hope that helps

Ray






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users