hya i have a website built in php html and javascript and at the moment when a couple registers they go straight to a single persons profile page and i want to going to a couples profile page where both there information is stored how can i do this

any help much needed x

you can achieved this by storing the member's status on the database.

for example,

+ user_id + user_name + status  + couple_id +
+---------+-----------+---------+-----------+
+    1    +  husband  + married +    2      +
+---------+-----------+---------+-----------+
+    2    +  wife     + married +    1      +
+---------+-----------+---------+-----------+

So if either one or both are logged in , we can assign their status in session

session_start();

if($_SESSION['logged_in']){

    ## set session for the status, couple_id

   if(!isset($_SESSION['status']) || (empty($_SESSION['status']))){
       $_SESSION['status'] = $row['status'];
       $_SESSION['username'] = $row['username'];
       $_SESSION['couple'] = $row['couple_id'];
   }

   }

use the session as the determinant as to where the user should go..

    if(isset($_SESSION['status']) && isset($_SESSION['username']) && ($_SESSION['logged_in'])){

        ## redirect to a couple page
        ## send a mysql query to retrieve both of the members profile data.

        }

    else{

            ## redirect to a single page
    }

there are so many derivatives in doing what you want and my example is just one of them..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.