Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
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 April 1st, 2005, 07:07 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default Find space in password

Hi

how can i find the space in password.
for example i have register form and i do not want any of my user use space in there password.

What should i do?

thanks
regards

 
Old April 1st, 2005, 11:32 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Incorporate this into your code:

$has_a_space = strpos($_POST['password'],' ') !== FALSE;
if($has_a_space)
echo 'Sorry, your password can\'t have a space!';

hth,

-Snib - http://www.snibworks.com
Where will you be in 100 years?
 
Old April 4th, 2005, 02:03 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thank You So Much Snib






Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't find User Id and password for Chapter 6 jellyjune BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 September 21st, 2007 02:39 PM
Open Word Doc from Access - find, find next save donaldmaloney Access VBA 1 May 25th, 2005 11:09 AM
space crmpicco Javascript How-To 1 February 7th, 2005 01:26 PM
Create a find and a find and replace in VB.NET snowy0 VB How-To 0 January 26th, 2004 07:03 PM





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