|
Posted by teser3@hotmail.com on July 2, 2008, 7:36 pm
Please log in for more thread options >
> > For the below query:
> > ----------
> > $res =3D mysql_query("select * from tableOne where clientID=3D'".
> > $_GET['getClientId']."'") or die(mysql_error());
>
> Firstly, you seem to be using user/url input without sanitizing it.
>
> > =A0 if($inf =3D mysql_fetch_array($res)
> > -----------------
> > The return from this ($inf =3D mysql_fetch_array($res) looks like this:
> > $inf["firstname"]
> > $inf["lastname"]
> > $inf["address"]
>
> > I assume this translates to?
>
> > 0 =3D firstname
> > 1 =3D lastname
> > 3 =3D address
>
> mysql_fetch_array can produce zero indexed array, associated array or
> both. Default is both.
> So I guess in your case you'd get:
>
> $inf =3D Array(
> =A00 =3D> value
> =A0firstname =3D> value
> =A01 =3D> value
> =A0lastname =3D> value
> =A02 =3D> value
> =A0address =3D> value
> )
>
> Jay
Thanks Jay!
|