Jump to content

[SOLVED] PHP GET Issue


behzad

Recommended Posts

Hi There.

 

I have Get Issue in URL

 

E.g

 

If I have a url lets say  "www.mydomain.com/page_x.php?passvariable=10"

 

If someone changes the "passvariable=10" To "passvariable=15" as example they go to that record that might not be relevent to them even if they are loged in.

 

Is there a way of validating or avoiding this to happen?

 

I am new to php realy so good explanation could help me better.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/66865-solved-php-get-issue/
Share on other sites

Hi there

 

Maybe I am not clear in my explanation.

 

The passvariable lets say being a product of some what. Is there a way if the number "value for the passvaiable"  if changed manually from the url string to be avoided?

 

I do not want some to get access to the products lets say from changing the passvariable in address bar of the browser.

 

 

Link to comment
https://forums.phpfreaks.com/topic/66865-solved-php-get-issue/#findComment-335230
Share on other sites

Well, unless you have these numbers tied to a particular user, then I don't see a way to block someone from doing that. One other way around this would be to pass this variable using a session. This way the person cannot just change the number and gain access to other stuff.

 

 

Nate

Link to comment
https://forums.phpfreaks.com/topic/66865-solved-php-get-issue/#findComment-335231
Share on other sites

you could use posts instead of gets

 

That would require forms and such. In my opinion those sites that use forms and post vars for EVERYTHING get on my last freaking nerve. You can't refresh a page, and when you try to go back, you get the "post data already sent' message.

 

but that is just my opinion.

 

 

Nate

Link to comment
https://forums.phpfreaks.com/topic/66865-solved-php-get-issue/#findComment-335287
Share on other sites

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.