--- "J. Alden Gillespy" <[EMAIL PROTECTED]> wrote:
> I'm creating an e-commerce website, and I just need
> clarification as to whether a MySQL query is
> considered as "browser output". 

It is not. However, a MySQL error is indeed output. Make
sure your query is successful.

My suggestion would be to simplify your code. Test your
queries independently of setting cookies and redirecting.
You have too many potential cases for error as it is, and
that makes things difficult.

> mysql_query("select * from `$cart->user_table` where
> username=\"$username\" and userpass=\"$userpass\"",
> $cart->dblink)

I'm not sure if it is just formatting or my eyes, but it
looks like you have backticks in your query. Also, you
should consider using single quotes around your values
rather than escaped double quotes.

> setcookie("jackloren_user", "$username:$userpass", time()
> + 2592000);
> header("Location: http://www.jackloren.com/";);

You should test this combination separately. Depending on
several factors, your cookie may not be getting set due to
the Location header redirect. The combination works fine
with most modern Web agents, but it has been known to pose
problems for developers.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to