Jump to content

Few Questions


Phpnewby

Recommended Posts

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

[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]
<?php
session_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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.