•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 426,498 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,216 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 497 | Replies: 11
![]() |
•
•
Join Date: Mar 2008
Posts: 69
Reputation:
Rep Power: 1
Solved Threads: 0
i were working offline all the time with wampserver installed in my comp.
but after i loaded it in school server i experienced a problem,
in my web after login in your own profile appears also their is a link were you see other members profile.
My problem is that when you open other profile and tend to open again(myprofile)your own profile which is also as a link after opening another profile.
some of the datas of the other member especialy the last registered member appears on myprofile,while offline i didn`t have such a problem.
How can i overcome this???????????
but after i loaded it in school server i experienced a problem,
in my web after login in your own profile appears also their is a link were you see other members profile.
My problem is that when you open other profile and tend to open again(myprofile)your own profile which is also as a link after opening another profile.
some of the datas of the other member especialy the last registered member appears on myprofile,while offline i didn`t have such a problem.
How can i overcome this???????????
•
•
Join Date: Jan 2008
Posts: 70
Reputation:
Rep Power: 1
Solved Threads: 5
•
•
•
•
i were working offline all the time with wampserver installed in my comp.
but after i loaded it in school server i experienced a problem,
in my web after login in your own profile appears also their is a link were you see other members profile.
My problem is that when you open other profile and tend to open again(myprofile)your own profile which is also as a link after opening another profile.
some of the datas of the other member especialy the last registered member appears on myprofile,while offline i didn`t have such a problem.
How can i overcome this???????????
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
That's strange. Is there any change of version in php/apache ? I can't think of a reason why your script is acting weirdly !
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,458
Reputation:
Rep Power: 11
Solved Threads: 296
Schools do not often secure properly other users directories and once you login into system you able to browse other users work, this is just side observation
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
•
•
Join Date: Mar 2008
Posts: 69
Reputation:
Rep Power: 1
Solved Threads: 0
This is the script i used to login:
php Syntax (Toggle Plain Text)
<html> <head> <title>Welcome|To our site</title></head> <body bgcolor=black> <?php //header( 'refresh: 5; url=http://localhost/website/member.php' ); $user=$_POST['user']; $password=($_POST['password']); //connecting to databases $dbcnx=@mysql_connect('localhost','root','*********'); if(!$dbcnx){ exit('<p>unable to connect to the database'. ' this time try again later.</p>'); } if (!@mysql_select_db('register')){ exit('<p>unable to locate the REGISTER DATABASE'. 'AT THIS TIME'); } //makes sure they filled it in if(!$_POST['user'] | !$_POST['password']) { echo "<center><font color=white size=12>Either pass or UserName are not filled<br><a href=peacemaker.php>Go back and try again</a></font></center>"; }else{ session_start(); $query = "SELECT *FROM login where (user='$user' and password='$password')" ; $result=mysql_query($query); if(mysql_num_rows($result) == 1) { $row=mysql_fetch_array($result); $id=$row['id']; $name=$row['name']; $user=$row['user']; $email=$row['email']; $country=$row['country']; $password=$row['password']; $location=$row['location']; $langu1=$row['langu1']; $langu2=$row['langu2']; $family=$row['family']; $education=$row['education']; $age=$row['age']; $male=$row['male']; $female=$row['female']; $hobbie=$row['hobbie']; $phone=$row['phone']; $address=$row['address']; $web=$row['web']; $relation=$row['relation']; $position=$row['position']; $movies=$row['movies']; $date=$row['date']; $_SESSION['id']=$row['id']; $_SESSION['name']=$row['name']; $_SESSION['user']=$row['user']; $_SESSION['email']=$row['email']; $_SESSION['country']=$row['country']; $_SESSION['password']=$row['password']; $_SESSION['location']=$row['location']; $_SESSION['langu1']=$row['langu1']; $_SESSION['langu2']=$row['langu2']; $_SESSION['family']=$row['family']; $_SESSION['education']=$row['education']; $_SESSION['age']=$row['age']; $_SESSION['male']=$row['male']; $_SESSION['female']=$row['female']; $_SESSION['hobbie']=$row['hobbie']; $_SESSION['phone']=$row['phone']; $_SESSION['address']=$row['address']; $_SESSION['web']=$row['web']; $_SESSION['relation']=$row['relation']; $_SESSION['position']=$row['position']; $_SESSION['movies']=$row['movies']; $_SESSION['date']=$row['date']; include "myprofile.php"; }else{ include "login_Bad.php"; } } ?> </td></tr></table> </table> </body> </html> and the myprofile.php is here: <html> <head> <?php header( 'refresh:5; url=http://localhost/website/myprofile.php' ); //header("Location: http://localhost/website/myprofile.php"); // header( 'refresh: 5; url=http://localhost/website/myprofile.php' ); session_start(); $id=$_SESSION['id']; $name=$_SESSION['name']; $user=$_SESSION['user']; $email=$_SESSION['email']; $country=$_SESSION['country']; $password=$_SESSION['password']; $location=$_SESSION['location']; $langu1=$_SESSION['langu1']; $langu2=$_SESSION['langu2']; $family=$_SESSION['family']; $education=$_SESSION['education']; $age=$_SESSION['age']; $male=$_SESSION['male']; $female=$_SESSION['female']; $hobbie=$_SESSION['hobbie']; $phone=$_SESSION['phone']; $address=$_SESSION['address']; $web=$_SESSION['web']; $relation=$_SESSION['relation']; $position=$_SESSION['position']; $movies=$_SESSION['movies']; $date=$_SESSION['date']; ?> <title>welcome| <?php echo$user?></title></head> <body bgcolor=black> <table width=646 height=30 align=center border=0 background=COMD.jpg cellspacing=8 cellpadding=2 > <TR><td><img src=SOMA.jpg width=601 height=50></td></tr> </table> <table width="646" border="0" cellpadding="2" background="bg-header.jpg" cellspacing="2" ALIGN=CENTER borderclor=red> <tr valign="top"> <td><br><b><a href=home2.php>HOME</a></b> </td> <td><br><b><a href=myprofile.php>MYPROFILE</a></b> </td> <td><br><b><a href=comment.php>COMMENTS</a></b> </td> <td><br><b><a href=member2.php>MEMBERS</a><b> </td> <td><br><b><a href=comedy.php>COMEDY</a></b> </td> <td><br><b><a href=photo/index.html>PHOTOS</a></b> </td> <td><br><b><a href=music.php>MUSIC</a></b> </td> <td><br><b> <form action=logout.php method=get><input type=submit value="LOGOUT" ></form></b> </td> </tr> </table> <table width=646 height=20 align=center border=0 bgcolor=gainsboro cellspacing=8 cellpadding=2> <TR VALIGN=TOP> <td WIDTH=20 height=10> <TABLE width=20 bgcolor=lightblue border=1 cellpadding=0 cellspacing=0 align=left height=10 bordercolor=black> <tr align=top><td ><B><br><a href=myprofile.php>FRIENDS</a></B></td></tr><tr VALIGN=TOP><td><B><br><a href=myprofile.php>MY PHOTO</a></B></td></tr><tr><td><B><br><a href=myprofile.php><NOBR>MESSAGE</NOBR></a></B></td></tr><tr><td><B><br><a href=edit.php>SETTING</a></B></td></tr> <tr><td><B><br><a href=myprofile.php>MY VIDEO</a></B></td></tr><tr><td><B><br><a href=myprofile.php>REQUEST</a></B></td></tr><tr><td><B><br><a href=myprofile.php><nobr>WHO VISITED</nobr></a></B> </td></tr><tr><td><B><br><a href=invite.php>INVITE</a></B></td></tr></table> </td><td width=80 align=center><P><b>Helloo!!</b><?php echo"<font size=3 color=brown><b><nobr>$user</b></font>";?></nobr></p><p align=center><img src=man.jpg width=140 height=150></p> <table width=80 height=10 border=1 cellspacing="1" cellpadding=1 bordercolor=black> <caption><nobr><b><font color=brown>MORE ABOUT ME</font></b></nobr></caption> <tr><td valign=top width=200 height=10> <p><b>Name:</b><?php echo"<font color=blue><b>$name $family</b></font>"; ?></p><p><nobr><b>Email:</b><?php echo "<font color=blue><b>$email</b></font>"; ?></nobr></p><p><b>Address:</b><?php echo "<font color=blue><b>$address</b></font>";?></p><p><b>Language:</b><?php echo"<font color=blue><b>$langu1</b></font>,<b><font color=blue> $langu2</b></font>";?></p><p><b>POSITION:</b><?php echo "<font color=blue><b>$position</b></font>";?></p> <p><b>Hobbie:<b><?php echo "<font color=blue><b>$hobbie</b></font>";?></p><p><b>Phone:</b><?php echo"<font color=blue>$phone</font>";?></p><p><b>Web:</b><?php echo "<font color=blue>$web</font>";?></p><p><nobr><b>Favorite Music:</b><?php echo "<font color=blue>$music</font>";?></nobr><nobr><b>Favorite Movies:</b><?php echo "<font color=blue>$movies</font>";?></p> </td></tr> </table> </td><td><p><font color=yellow><b>Browse with pleasure</b></font></p><p><table width=100 height=100 border=0 cellspacing="1" cellpadding=1> <tr><td valign=top><b>Gender:</b></td><td valign=top><b>Age:</b></td></tr> <tr align=><td valign=top align=><?php echo "<font color=blue><b> $male $female</b></font>";?></td><td valign=top><?php echo"<font color=blue><b>$age</b></font>";?></td></tr><tr><td valign=top><nobr><b>location:</b></nobr></td><td valign=top><nobr><b>Nationality:</b></nobr></td></tr><tr><td valign=top><nobr><?php echo"<font color=blue><b>$location</b></font>"?></nobr></td><td valign=top><?php echo "<font color=blue><b>$country</b></font>";?></td></tr> <tr align=center><td valign=top><nobr><b>Member Since:</b></nobr></td><td valign=top><nobr><b>Relation status:</b></nobr></td></tr> <tr ><td valign=top><nobr><?php echo"<font color=blue><b>$date</b></font>";?></nobr></td><td valign=top><?php echo "<font color=blue><b>$relation</b></font>";?></td></tr> </table></p><hr font color=black></hr> </td> </TR> </table> </body> </html>
Last edited by peter_budo : May 15th, 2008 at 7:50 am. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
Its very difficult to say what is going wrong. Try unsetting the session variables and see if it does any trick.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
Umm.. When you visit someone's profile, will his details be added to the session ? If yes, then unset the session variables before using it again. If no, then, I can't think of anything else.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Body Text lost when sending hotmail (Web Browsers)
- Quick Launch toolbar lost (Windows 9x / Me)
- Lost browser links,internet options etc...toolbar (Web Browsers)
- Have I lost RAM? (Motherboards, CPUs and RAM)
- recover lost file in windows XP (Windows NT / 2000 / XP / 2003)
- lost address book addresses (OS X)
- IDE devices lost during post W2K (Windows NT / 2000 / XP / 2003)
Other Threads in the PHP Forum
- Previous Thread: How to get my update working and my search to work properly?
- Next Thread: Georgean Date to Persian Date, and vice versa



Linear Mode