Jump to content

[SOLVED] Passing values in the URL


ainoy31

Recommended Posts

Hello-

 

I am sending emails with a hyperlink in the body where my users can click on and it will take them to a certain page. 

$body .= "http://xxx.php?y=$id";

 

Is there a way not to make the $id value visible?  Meaning, in the email they see

$body .= "http://xxx.php?y=100";

 

Much appreciation. 

Link to comment
Share on other sites

i beleive what you are doing is trying to hid the value of $id when they hit up your site.  The problem is that the way you are trying to do it is not possible because of how php is processed.  Everything is done at run time, so the $id variable will only exist for the few seconds that it takes to run the script, after that it is gone and not longer exist.  The value of it also disappears.  This is why you can use the same variable on 2 different pages and not have to worry about cross contamination.

 

If you are trying to hid the value from them, you may be best to set up a SQL table that looks at the unique identifier and then grabs the variable out of there.  You would still have to pass the user name, or some other unique identifier, in the link, but it would not have to be what you do not want them to see.

 

~D

Link to comment
Share on other sites

The work around what I need is that I pass three variables in the URL and then check to make sure that all three values correspond to each other.  Meaning if I had www.xxx.com/xxx.php?a=$id&b=$em&c=$pn, someone can not say just change one of the variables and access other quotes.

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.