-
1. Re: Echo Link not working
David_Powers Nov 10, 2010 5:56 AM (in response to Fumph)First of all, you should never, ever post the login details of your database in a public forum. It's an open invitation to be hacked.
Secondly, your code after echoing "Account added!" doesn't make any sense. To start with, you can't call setcookie() after sending output to the browser (with echo, for example). Secondly, you're storing the links in the cookie. You should just store something like the user's logged in status. Finally, you're using </php> to close the PHP block.
The other problem with your code is that you're inserting user input directly into your database without sanitizing it. This lays you open to the dangers of SQL injection.
You should pass all $_POST variables to mysql_real_escape_string() before using them in a SQL query.
Take a look at the PHP manual for mysql_real_escape_string() and setcookie().
-
2. Re: Echo Link not working
Fumph Nov 27, 2010 8:48 PM (in response to David_Powers)Oh my goshh! sorry completly forgot about those details! Sorry, but thank
you I fixed it!



