Jump to content

[SOLVED] Question about $_GET


kryppienation

Recommended Posts

Howdy!

 

I have a question about $_GET.

 

I have the following code in my page:

 

echo '<tr><td colspan="100%" align="center"><font color="red">'.$deletedmsg.'</font></td></tr>';
echo '<tr><td>From:</td><td>Message:</td><td align="right"><font size="2"><a href="residence.php?action=deleteall&faid='.$id.'">Delete All</a></font></td></tr>';

 

 

When a user click the link it does with it's supposed to do, my question however, is there a way to replace the $id with encryption.

 

Once clicked I get this in my browser:

 

http://localhost/kryppienation/home/residence.php?action=deleteall&faid=2

 

I would really like the number there to be so others cannot see the actual value.

Link to comment
https://forums.phpfreaks.com/topic/136183-solved-question-about-_get/
Share on other sites

mod_rewrite mate...

 

http://www.workingwith.me.uk/articles/scripting/mod_rewrite

 

or use not that secure but worth a go.

 

<?php

$url = 'mygold_nugets=?money=1000';

$encodded=base64_encode($url);

echo "url encodded $encodded ";

$decoded=base64_decode($encodded);

echo " <br> url decodded $decoded";

?>

 

 

mycript is very powerful well worth the look.

 

but mod_rewrite is as powerful for this task.

 

and tell the truth if the user can not see somethink they shouldnt or effect the database the example i posted is grate.

 

 

So u no them 1 way encodeing.

 

<?php


//encoded but not decodeable.
echo sha1("mygold_nugets=?money=1000");

echo "<br><br>";

//encoded but not decodeable.
echo md5("mygold_nugets=?money=1000");

echo"<br><br>";

//encoded but not decodeable.
echo md5(sha1(md5("mygold_nugets=?money=1000")));

?>

 

also

http://uk2.php.net/crypt

 

Salt with md5 seems to be the best these days i here

Redarrow,

 

Thank you very much, your first example will be just fine for my purposes. I was able to make everything work with it and i feel much better about people not being able to see their id. I needed to be able to decode them on the action though, so the second example wouldn't work. Again, thanks for your time and help.

 

~Kryppie Nation

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.