I am going to bring over the info from the cross post so we can keep it all in one thread.
I would've thought this was the important line
$targetid = "id=".$finalid;
but how do I encrypt it?
There are several different types of encryption algorithms you could use...
$finalid = md5($finalid);
$targetid = "id=".$finalid;
And Sgarissta's post was more helpful than you think... Open you rmind and know it wasn't meant to poke at you personally. You aren't the only one who bumps (and 13 minutes was a long time... some have bumped in 2 minutes)
Cross posting and bumping are frowned upon, and the regulars generally don't respond to either. The reason is because bumping takes away from other users. Cross-Posting only causes confusion for the thread starter and others who see both threads, because people have different ways of doing things, so 2 different solutions could potentially be offered on 2 different threads. Make sense? So in the future, please refrain from either activity.
P.S. The PHP Manual is very useful. I recommend you download the CHM version, and dig into it. Encryption is a pretty heavily coveered topic throughout it.