[PHP-DB] variable interpolation in mysql queries

2002-02-26 Thread Ryan Snow
Hi, Im kinda new to this list. Can anyone tell me what is the proper way to interpolate my php variables into my mysql queries? I've been trying $query = "SELECT password FROM users WHERE login='$login'"; then: mysql_query($result); $pd = mysql_result($result); but I get a message that say

Re: [PHP-DB] variable interpolation in mysql queries

2002-02-26 Thread Ryan Snow
> > list($pd) = mysql_fetch_row ( > mysql_query ( > "select password > from users > where login = '$login'" > ) > ); > > Then you can test $pd without getting sql errors. > > -- Stewart > > --- Ryan Snow <[EMAIL PR

[PHP-DB] why won't session_start() work?

2002-02-27 Thread Ryan Snow
when I do: session_start(); session_register('signor'); session_register('username'); I get: Warning: Cannot send session cookie - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/index.php on line 14 Warning: Cannot send se