Re: [PHP-WIN] Re: Problems with fscanf [WORKAROUND] fgetc

2006-09-29 Thread German Piqué
mmm... let me guess... you're saying that I must do something like this: $argo = fgets($fileID,sizeof($file)) And then work with the string? What do you mean by "using {} syntax"? Are you talking about regular expressions or what? Thanks. 2006/9/28, Alex Turner <[EMAIL PROTECTED]>: Stanis

RE: [PHP-WIN] Re: Problems with fscanf [WORKAROUND] fgetc

2006-09-29 Thread Luis Moreira
The "{} syntax" means to run a command whithin another command, whitout having to store results previously. As an example, both following codes do the same, and you don't loose time storing and retrieving variable $argo $argo = fgets($fileID,sizeof($file)); Echo "$argo"; And Echo "{fgets($fil

[PHP-WIN] insert md5 password

2006-09-29 Thread Alf Stockton
Using MSSQL database I am attempting to insert a new user into a table using the following command in PHP:- INSERT INTO Users (FirstName, LastName, Usrname, Passwrd, AccessLevel, last_login, UserID) VALUES ('Alf', 'Stockton', 'alf', 0xd8cc7e40d17aaefd27cd324f7ba91079, '9', '2006/09/29 12:05:23', '0

RE: [PHP-WIN] insert md5 password

2006-09-29 Thread SMITHT
INSERT INTO Users (FirstName, LastName, Usrname, Passwrd, AccessLevel, last_login, UserID) VALUES ("Alf", "Stockton", "alf", "0xd8cc7e40d17aaefd27cd324f7ba91079", 9, "2006/09/29 12:05:23", 0) Put the hashed password in as a string. Tom -Original Message- From: Alf Stockton [mailto:[EMAIL

Re: [PHP-WIN] Re: Problems with fscanf [WORKAROUND] fgetc

2006-09-29 Thread German Piqué
I didn't kwon that! :O Thanks! 2006/9/29, Luis Moreira <[EMAIL PROTECTED]>: The "{} syntax" means to run a command whithin another command, whitout having to store results previously. As an example, both following codes do the same, and you don't loose time storing and retrieving variable $a

[PHP-WIN] RE: TPN POSSIBLE SPAM:Re: [PHP-WIN] Re: Problems with fscanf [WORKAROUND] fgetc

2006-09-29 Thread Alex Turner
German, You can access the characters of a string one at a time using the syntax $myString{$i} So I was suggesting getting the data into a string and iterating over the string using this syntax rather than repeatedly calling fgetc. The chances are that it would be faster - it rather d

[PHP-WIN] RE: TPN POSSIBLE SPAM:RE: [PHP-WIN] Re: Problems with fscanf [WORKAROUND] fgetc

2006-09-29 Thread Alex Turner
Yes - it does mean that as well - but that is not what I meant! Thanks AJ Alexander J Turner Ph.D. www.deployview.com www.nerds-central.blogspot.com www.project-network.com -Original Message- From: Luis Moreira [mailto:[EMAIL PROTECTED] Sent: 29 September 2006 11:44 To: 'German Piqué';

Re: [PHP-WIN] RE: TPN POSSIBLE SPAM:Re: [PHP-WIN] Re: Problems with fscanf [WORKAROUND] fgetc

2006-09-29 Thread German Piqué
:O thanks for the idea, I will try! :) 2006/9/29, Alex Turner <[EMAIL PROTECTED]>: German, You can access the characters of a string one at a time using the syntax $myString{$i} So I was suggesting getting the data into a string and iterating over the string using this syntax rather th

Re: [PHP-WIN] insert md5 password

2006-09-29 Thread Alf Stockton
SMITHT wrote: > INSERT INTO Users (FirstName, LastName, Usrname, Passwrd, AccessLevel, > last_login, UserID) VALUES ("Alf", "Stockton", "alf", > "0xd8cc7e40d17aaefd27cd324f7ba91079", 9, "2006/09/29 12:05:23", 0) > > Put the hashed password in as a string. > > The command now looks like:- INSERT

Re: [PHP-WIN] insert md5 password

2006-09-29 Thread Alf Stockton
The relevant PHP code looks like :- $Surname = strip_tags($_POST['Surname']); $FirstName = strip_tags($_POST['FirstName']); $uname = strip_tags($_POST['uname']); $passwd = strip_tags($_POST['passwd']); $accesslevel = strip_tags($_POST['accesslevel']); $passwd = md5($passwd

Re: [PHP-WIN] insert md5 password

2006-09-29 Thread DvDmanDT
Just check why it fails.. mysql_error() returns a string with the last error message.. -- // DvDmanDT mail: dvdmandt¤telia.com msn: dvdmandt¤hotmail.com "Alf Stockton" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > SMITHT wrote: >> INSERT INTO Users (FirstName, LastName, Usrn

Re: [PHP-WIN] insert md5 password

2006-09-29 Thread Alf Stockton
DvDmanDT wrote: > Just check why it fails.. mysql_error() returns a string with the last error > message.. > > Unfortunately this is mssql not mysql..:-( -- Regards, Alf Stocktonwww.stockton.co.za You'll never see all the places, or read all the books, but fortunately, they'

RE: [PHP-WIN] insert md5 password

2006-09-29 Thread SMITHT
mssql_get_last_message(), or if that doesn't return anything useful, try this code from a PHP manual user note: function get_sql_error ($con) { $sql= "select @@ERROR as code"; $result = mssql_query($sql, $con); $row= mssql_fetch_array($result); $code = $row

Re: [PHP-WIN] insert md5 password

2006-09-29 Thread Alf Stockton
SMITHT wrote: > mssql_get_last_message(), or if that doesn't return anything useful, try > this code from a PHP manual user note: > > function get_sql_error ($con) { > >$sql= "select @@ERROR as code"; >$result = mssql_query($sql, $con); >$row= mssql_fetch_array($

Re: [PHP-WIN] insert md5 password

2006-09-29 Thread Niel Archer
Hi Alf > The command now looks like:- > INSERT INTO Users (FirstName, LastName, Usrname, Passwrd, AccessLevel, > last_login, UserID) VALUES ('Alf', 'Stockton', 'alf', > "0xd8cc7e40d17aaefd27cd324f7ba91079", '9', '2006/09/29 13:29:34', '0') > but still fails. What is the error returned? Does the

RE: [PHP-WIN] insert md5 password

2006-09-29 Thread Luis Moreira
And the field types, do they all match ? You are entering a date as a string, for example. If all else fails, try to insert only one field at a tine, to see which one fails. Luis -Original Message- From: Niel Archer [mailto:Niel Archer] On Behalf Of Niel Archer Sent: sexta-feira, 29 de

[PHP-WIN] login stuff

2006-09-29 Thread bob plano
i am very new to php and right now i am trying to make a members only part to my site. the login part of it doesn't work and i have been trying to diplay a mysql error like this: $result = mysqli_query($connection,$sql) or $message= mysql_error();