Welcome Guest [Log In] [Register]
Add Reply
[PHP]php question
Topic Started: Mar 2 2009, 08:48 PM (719 Views)
Knight13

0
Edited by Knight13, Mar 19 2010, 07:28 AM.
Offline Profile Quote Post Goto Top
 
GhettoFish
Member Avatar
Awesomeness FTW!
You do this with an if-statement and sessions or cookies.
When the user logs on you will check the userid against the DB to see that the user exists.
If the user exists you place the username or userID in a session.

Then later on the page when browsing you only display tables and fields that are correct with the userID
Like this
Code:
 

<-- Only Carl will read this -->
<?php
$name = "carl";
if($name == "carl"){
echo "this can only" . $name . "read...";
}

Hope that makes sense :)
im tired!
I'm not young enough to know everything.
- J.M. Barrie
http://www.cixz.org/
Offline Profile Quote Post Goto Top
 
PauloMillerz
Member Avatar

PHP can get quiet complex when you use different tables with mysql etc, but I find that as long as I am clear on the logic, it's just a case of finding the right syntax to do the logic. But yea GF is on the right track with ifs and like..

By the way.. that's a heck of a task you have set urself there for a newbie.. well done for the effort..

Do not double Post -Alex
Edited by Alex, Mar 3 2009, 08:16 PM.
If you like... RATE IT!! Add to my reputation to the left?
Quote:
 
Bidet to you sir!

Posted Image
Offline Profile Quote Post Goto Top
 
GhettoFish
Member Avatar
Awesomeness FTW!
PauloMillerz
Mar 3 2009, 06:44 AM
By the way.. that's a heck of a task you have set urself there for a newbie.. well done for the effort..
Yeah I was just about to state that my self. But it hit me that I am the same. As you can read in the Project Recruitment forum I am working on my own forum and I am in no way awesome at PHP or SQL. But it comes to you once you get started. The only way to aqcuire new knowledge is to do stuff you don't know how to do :)

As long as you plan out your project and have realistic goals it should work out fine mate.
I'm not young enough to know everything.
- J.M. Barrie
http://www.cixz.org/
Offline Profile Quote Post Goto Top
 
PauloMillerz
Member Avatar

My belief too.. I am currently building a fantasy football (soccer) website.. one heck of a project.. and same here, i am an expert on it by any means.. but i too learn as i go.. so rewarding dont ya think!
If you like... RATE IT!! Add to my reputation to the left?
Quote:
 
Bidet to you sir!

Posted Image
Offline Profile Quote Post Goto Top
 
Knight13

0
Edited by Knight13, Mar 19 2010, 07:28 AM.
Offline Profile Quote Post Goto Top
 
PauloMillerz
Member Avatar

key is not to get annoyed when you hit a cyber brick wall.. just to get a sledge hammer to it!!
If you like... RATE IT!! Add to my reputation to the left?
Quote:
 
Bidet to you sir!

Posted Image
Offline Profile Quote Post Goto Top
 
Dillon
Member Avatar

PauloMillerz
Mar 3 2009, 07:37 AM
key is not to get annoyed when you hit a cyber brick wall.. just to get a sledge hammer to it!!
Yea, that is true! Thats a good way to put it! :D
<?

$text == "Hello World";

echo $text;

?>
Offline Profile Quote Post Goto Top
 
Darksorrow131

GhettoFish
Mar 3 2009, 06:56 AM
PauloMillerz
Mar 3 2009, 06:44 AM
By the way.. that's a heck of a task you have set urself there for a newbie.. well done for the effort..
Yeah I was just about to state that my self. But it hit me that I am the same. As you can read in the Project Recruitment forum I am working on my own forum and I am in no way awesome at PHP or SQL. But it comes to you once you get started. The only way to aqcuire new knowledge is to do stuff you don't know how to do :)

As long as you plan out your project and have realistic goals it should work out fine mate.
Same with me, I worked on some Ruby on Rails applications before, and on the day I started I knew almost nothing about Ruby lol... but after working on it I learned a lot.
(let loop () (loop))
((lambda (x) (x x)) (lambda (x) (x x)))
(let ((k #f)) (call/cc (lambda (cc) (set! k cc)) (k))
((call/cc call/cc) (call/cc call/cc))

-- Infinite loops are awesome! --
Tell me if you have other awesome infinite loops!
Offline Profile Quote Post Goto Top
 
Knight13

0
Edited by Knight13, Mar 19 2010, 07:28 AM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Web-Based Programming Support · Next Topic »
Add Reply

Banner and Logo by TheKeith