Prevent URL modification?
Posted: Mon Mar 15, 2010 5:43 am
First page,
have link with this code...
Second page,
receiving id, and display content by id...
The problem...
so the second page url looks like this...
if I change the "id", so the page content change,
Anyone could help/give advice to prevent anyone for changing id from url...
thanks,
have link with this code...
Code: Select all
<a href=\"view_product2.php?id=$result[id]\">Edit</a>
receiving id, and display content by id...
Code: Select all
$id = $_GET['id'];
$view = mysql_query("SELECT * FROM product WHERE id='$id' ORDER BY id DESC");
$fetch = mysql_fetch_array($view);
so the second page url looks like this...
Code: Select all
http://localhost/site/secondpage.php?id=2Anyone could help/give advice to prevent anyone for changing id from url...
thanks,