You are here: possibly buffer problem, including a bit of code this time « PHP « IT news, forums, messages
possibly buffer problem, including a bit of code this time

Posted by matt VanDeWalle on 10/21/56 11:28

oops, sorry about the lack of any code with my last problem message.
I am still having the same buffer problem where after asking for a
password, it doesn't stop and wait, just falling through to the next
prompt. here is basically what the new_user function looks like. I am
using php 4.3.10 on slackware 10.1
/* the new user function */
function new_user($sock, $username)
{
global $cdata;
/* shorthand of socket_write is now send_single */
send_single($sock, "please type the username you would like to go by ");
$username = socket_read($sock, 1024, PHP_NORMAL_READ);
/* i had to change to PHP_NORMAL_READ or else windows users couldnt get on
with more than 1 char */
$username = trim($username);
/* now comes the problem as far as i'm seeing it program execution-wise */
send_single($sock, "please choose a password");
$pwd = socket_read($sock, 1024, PHP_NORMAL_READ);
$passwd = trim($pwd);
send_single($sock, "email address to send your signup info");
$email = socket_read($sock, 1024, PHP_NORMAL_READ);
$email = trim($email);
/* do rest of function like fill array and write userfile etc */
...........
}
ok: as far as i can tell, it asks for the password, skips that, and goes
right onto the prompt that asks for the email address (totally skips that
as well), and proceeds to fill the array and write the file and then log
the user on, so of course half of the array variables seem to be blank and
the file doesn't contain the password or email)
obviously I'm doing something wrong but what?
matt
ps, hope that is enough of the code to tell

 

Navigation:

[Reply to this 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

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