Phpnewby Posted January 7, 2007 Share Posted January 7, 2007 I am new here so I apologize if I post in the wrong forum or anything. But I stink at php and hope you pros here can answer a few questoins.1. On my site there is a horizontal nav bar. For a link I want it to direct to one page for users who aren't logged in; and for people who are logged in I want it to go to a seperate page. Any ideas? 2. Right now my site is designed like www.scriptlance.com and there are two seperate tables for freelancers and webmasters. I have accounts merged, but depending on if they are logged in as a webmaster or freelancer they have different balances in each account. I want to merge these balances so all their money is in one account. Is there any semi-easy way to fix this.Thanks in advance for any help anyone provides me here. Link to comment https://forums.phpfreaks.com/topic/33220-few-questions/ Share on other sites More sharing options...
HoTDaWg Posted January 7, 2007 Share Posted January 7, 2007 [quote author=Phpnewby link=topic=121384.msg499032#msg499032 date=1168189534]I am new here so I apologize if I post in the wrong forum or anything. But I stink at php and hope you pros here can answer a few questoins.1. On my site there is a horizontal nav bar. For a link I want it to direct to one page for users who aren't logged in; and for people who are logged in I want it to go to a seperate page. Any ideas?[/quote]well what method do you wanna use? if its sessions you can do something like this:[b]redirect.php[/b][code]<?phpsession_start();if(isset($_SESSION['loggedin'])){header("Location: http://www.urlforloggedinusers.com/");}else{header("Location: http://www.urlforpeoplenotloggedin.com/");}?>[/code]if you create a session on the original page, simply link to redirect.php and it will forward the user to the pages. class dismissed,HoTDaWg Link to comment https://forums.phpfreaks.com/topic/33220-few-questions/#findComment-155107 Share on other sites More sharing options...
HoTDaWg Posted January 7, 2007 Share Posted January 7, 2007 in anyone is interested, to create a session:[code]<?phpsession_start();header("Cache-control: private"); $_SESSION['loggedin']=$variable_about_user;?>[/code]just put the above code somewhere in your orignal document to create a session. Link to comment https://forums.phpfreaks.com/topic/33220-few-questions/#findComment-155110 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.