Re: [PHP] Is this code right?

2004-01-19 Thread Radwan Aladdin
January 19, 2004 10:16 PM Subject: Re: [PHP] Is this code right? > Radwan Aladdin wrote: > > Do you mean this is the right code : > > > The code overall looks right, but you set $Serial twice... first you do: > > $Serial = $_GET['Serial']; > > Then you d

Re: [PHP] Is this code right?

2004-01-19 Thread Ben Ramsey
Radwan Aladdin wrote: Do you mean this is the right code : The code overall looks right, but you set $Serial twice... first you do: $Serial = $_GET['Serial']; Then you do: $Serial = htmlspecialchars($row[0]); Then you set $UserSerial to $row[1] (the same as the Password column). So, when you

Re: [PHP] Is this code right?

2004-01-19 Thread Radwan Aladdin
quot;Jeremy Davis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 19, 2004 9:40 PM Subject: RE: [PHP] Is this code right? > > >$query = "SELECT Serial, Password from accounts where > UserName='$UserName'"; > >$result = mysql_

Re: [PHP] Is this code right?

2004-01-19 Thread Ben Ramsey
Radwan Aladdin wrote: Oh sorry.. I didn't notice that.. anyway.. I want to know.. what to add to this code to make it also check the serial between the database (That users' row) and the GET variable before it echos anything.. so the UserName, Password and Serial must be the same for that user.. It

RE: [PHP] Is this code right?

2004-01-19 Thread Jeremy Davis
>$query = "SELECT Serial, Password from accounts where UserName='$UserName'"; >$result = mysql_query($query) or die("Query errort: " . mysql_error()); >$row = mysql_fetch_row($result) or die("User Not found: " . mysql_error()); mysql_fetch_row only pulls data one cell at a time so you would need

Re: [PHP] Is this code right?

2004-01-19 Thread Radwan Aladdin
your reply.. regards.. - Original Message - From: "Miguel J. Jiménez" <[EMAIL PROTECTED]> To: "Radwan Aladdin" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, January 19, 2004 9:29 PM Subject: Re: [PHP] Is this code right? > Radwan Al

Re: [PHP] Is this code right?

2004-01-19 Thread "Miguel J. Jiménez"
Radwan Aladdin wrote: Hi all.. I made this code for the login.php page.. it will compare A value from the users machine (Serial) and with a value inside the database (In that users' row).. so after logging it will check if also this value is the same and then echo something..is the following code