I posted under the 'newbies' forum and got one suggestion as to my problem. I tried it and unfortuantely it didn't work, so I'm posting here for any other suggestions.
I am trying my hand at members/passes and I would appreciate any help as to why my $page isn't displaying. This is probably a stupid question, but I don't know why the page won't display. I have a db with three four columns, username, pass, page, and id. And when one enters their user and pass they are suppose to be redirected to their specific page, yet it pops up with a 404 page. I have the dbinfo of 'page' entered in the form of http://somedomain.com Here's the code, simple, yet suffices. Thank you and have a nice day!
<?php
if ($submit) {
$dbh=mysql_connect ("localhost", "dbuser", "dbpass") or die ('I cannot connect to the database.');
mysql_select_db ("dbname");
$result=mysql_query("select * from user where name='$username'") or die ("cant do it");
$page=mysql_query("select page from user where name='$username'");
while ($row=mysql_fetch_array($result)) {
if ($row["password"]==$password) {
header("Location: $page"); } */here I'd like to redirect them to their specific page
}
} ?>
It just doesn't seem to be picking up on the $page attribute. Any suggestions would be wonderful. Thank you!