Reply to strncmp function (Forgot code snippit)

Your name:

Reply:


Posted by Russ on 03/31/05 00:18

Subject: strncmp function
Date: Wednesday 30 March 2005 01:14 pm
From: Russ <russbucket@centurytel.net>
To: PHP General <php-general@lists.php.net>

I'm new to php and linux. I am trying to replace a password program I used
under windows with a mysql based login. I want to compare the first character
of the first and last name of the user for a capital letter. My login program
passes a user name and password. Below is a start to the program but I'm
alittle confused on how to set str1 to check all letters of the alphabet. Can
anyone point me to a document or give me an idea on how to do this? I can not
use .htaccess do to ISP (host) rules. Access is to a members only sectionof
the webpages for my Lions club.

<?php
$fname=John;
$lname=Smith;
if(strncmp(S,${lname},1) ===0) {
?>
<h1>strncmp() must have returned returned non-false</h1>
<?php
} else {
?>
<h3>Strncmp() must have returned false</h3>
<?php
}
?>
--
Russ

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация