View Full Version : Read Input and Show Output
YUPAPA
July 31st, 2001, 08:52
I want a user to fill out a form
My program is to read and output what he filled out.
For example, he filled out his username 'YUPAPA',
I want the program to read his input, 'YUPAPA' and output the 'Y' because it is the first letter of the word.
How do I do that?
lucifer
July 31st, 2001, 08:57
in php
have a form with field username
Post to php
<?
echo substr($username,0,1);
?>
niv
July 31st, 2001, 08:58
in what language?
query.php?username=YUPAPA
$first[$username]=substr($username, 0, 1); // returns first letter
YUPAPA
July 31st, 2001, 09:10
sorry, is PERL!
Dusty
July 31st, 2001, 10:22
In Perl it's the same
print substr($username,0,1);
lucifer
July 31st, 2001, 10:29
use CGI;
my $qry=new CGI;
my $username=$qry->param('username');
$first=substr $username,1,0;
should do it
[add]
there should be some sort of thread locking to prevent people posting while i'm responding - especially if I go to make a cup of tea
LastActionHero
July 31st, 2001, 12:29
hmm Yupapa didn't I answer that question on ICQ? :)
YUPAPA
July 31st, 2001, 17:11
Yes Yes Yes!
Thank you for giving me the great B-day presents :):)
LastActionHero
August 1st, 2001, 03:06
Birthday? Yesterday was your Birthday?
Happy Birthday! :)
YUPAPA
August 1st, 2001, 08:26
Yes Yes Yes, it WAS yesterday
Magic2K2
August 1st, 2001, 08:30
Why would he enter "YUPAPA"?????? I thought YOU were YUPAPA. :cool:
niv
August 1st, 2001, 08:33
:confused:??????????????
LastActionHero
August 1st, 2001, 11:41
Ah don't worry about him He drank a little too much alcohol at YUPAPA's B'day party. Just ignore him for now.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.