No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
5 Posted Topics
it is because of your else statement, I assume it prints "Incorrect Name and Password Combination" 9 times and then "Welcome user!"? You just need to move the else statement: [icode] if($user==$arrs[0]) { [INDENT]//echo "Welcome " . $user;[/INDENT] [INDENT]if($pass==$arrs[1])[/INDENT] [INDENT]{[/INDENT] [INDENT][INDENT]echo "Welcome " . $user ."!";[/INDENT][/INDENT] [INDENT]}[/INDENT] [INDENT]else[/INDENT] [INDENT]{[/INDENT] [INDENT][INDENT]echo …
well I am a little confused. For starters what is '$obj'? also, I see that you are trying to use variables from your function in your other script and use variables from your other script in your function. Unfortunately PHP does not work this way. from the looks of it …
for starters you need to make a call to '[URL="http://us3.php.net/manual/en/function.mysql-connect.php"]mysql_connect[/URL]' in order to get a connection to your database. [code=php] $connection = mysql_connect( 'localhost', 'user', 'secret_password' ); [/code] and then '$connection' would be your mysql resource that your would use in 'mysql_free_result'. hope this was helpful.
The reason is because you are setting cookie info, this will send the header to the browser, causing the error you are getting. Now my question to you is why are you even saving that information in a cookie, it is the same information you are saving in the session?
well the best advice I can give for finding that information is by going through the documentation on [URL="http://www.php.net"]www.php.net[/URL], if you search for, 'ftp' it will come up with the book on the ftp functions. I know this answer may not seem like the one you may of wanted, but …
The End.
pauper2thedemon