Jump to content

danielatunrase

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

danielatunrase's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am using dreamweaver to develop a member area for a client's website. I need to check from the database if the person is logging on for the first time and redirect accordingly and then update the database so that it recognizes the person has logged on before. I am using php/mysql and have created am integer field called firsttime in my database and created my login page. I named the page the login goes to as redirect.php and have a code generated by dreamweaver to protect the page from unauthorized access. I am very new to this but understand the basics of what i want done. If someone could help me flesh it out I'd appreciate it. 1. Select the database 2. select firsttime from the database table where the username is still the session variable (Dreamweaver uses this $_SESSION['MM_Username']) 3. store the result of the query in a variable liek the result in the example below 4. check if the result is 1 (for an old user) and redirects to one.php or if the result is 0 (for a new user) and redirects to zero.php at the same time updating the firsttime field to 1 in this case. Thats about it. I found this example in my search online but i don't know how to customize it to fit my needs. Will really appreciate the help Regards. <?php $checkvisits = "SELECT firsttime FROM churchushers WHERE user=$user"; $result = mysql_query($checkvisits); if($result <= "1"{ header("Location: first.php"; } else { ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.