Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 10th, 2007, 08:23 PM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default protecting url query strings

how to encrypt query strings
 
Old December 11th, 2007, 03:39 AM
Authorized User
 
Join Date: Mar 2005
Location: none, none, Philippines.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to cyber_kaley20 Send a message via AIM to cyber_kaley20 Send a message via Yahoo to cyber_kaley20
Default

<?php
$password = crypt('mypassword'); // let the salt be automatically generated

/* You should pass the entire results of crypt() as the salt for comparing a
   password, to avoid problems when different hashing algorithms are used. (As
   it says above, standard DES-based password hashing uses a 2-character salt,
   but MD5-based hashing uses 12.) */
if (crypt($user_input, $password) == $password) {
   echo "Password verified!";
}
?>


Escaler




Similar Threads
Thread Thread Starter Forum Replies Last Post
query strings problem saroo .NET Framework 2.0 1 October 23rd, 2007 06:41 AM
Query strings not becoming variables in IIS living-with-matilda Beginning PHP 0 February 3rd, 2006 09:07 PM
Query Strings ldoodle Classic ASP Basics 3 June 7th, 2005 03:45 AM
hiding Query Strings mase912 C# 1 November 30th, 2004 06:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.