Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Signup for Free!
-More Features-
-Far Less Ads-
About   Users   Help
Users & Guests Online
On Page: 1
Directory: 68
Entire Site: 3 & 712
Page Staff: pokemon x, pennylessz, Barathemos, tgags123, alexanyways, supercool22, RavusRat,
04-17-24 10:28 PM

Thread Information

Views
26,731
Replies
135
Rating
0
Status
CLOSED
Thread
Creator
Davideo7
12-04-05 04:35 PM
Last
Post
Lazlo Falconi
05-24-16 12:54 AM
Additional Thread Details
Views: 3,531
Today: 1
Users: 0 unique

Thread Actions

Thread Closed
New Thread
New Poll
Order
Posts


<<
7 Pages
>>
 

Official PHP Thread

 

10-18-08 12:55 AM
BigBob85 is Offline
| ID: 73409 | 94 Words

BigBob85
Level: 151

POSTS: 5913/6381
POST EXP: 217397
LVL EXP: 42856506
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
To do that, I just create a functions.php, include/requier it, whatever you like (google whats more efficient). And put my functions in there...

Similar thing to draw pages. In layout.php.

Have head(), takes some paramaters for title, ect.

Then menu(), draws the left navigation bar.. sometimes a bool in head( to decide if I draw this or not (that way it dosnt have its own function).

table(title, content) to draw my page data.

foot() to draw my footer and finish my html tags.

For a demo fo how it all looks (seemless), see, http://bigbob85.insaneparadox.com
To do that, I just create a functions.php, include/requier it, whatever you like (google whats more efficient). And put my functions in there...

Similar thing to draw pages. In layout.php.

Have head(), takes some paramaters for title, ect.

Then menu(), draws the left navigation bar.. sometimes a bool in head( to decide if I draw this or not (that way it dosnt have its own function).

table(title, content) to draw my page data.

foot() to draw my footer and finish my html tags.

For a demo fo how it all looks (seemless), see, http://bigbob85.insaneparadox.com
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1596 days
Last Active: 1230 days

10-20-08 01:04 AM
is Offline
| ID: 73459 | 34 Words


JigSaw
Level: 164


POSTS: 889/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
Looks nice. That's a pretty awesome idea gonna have to give it a test. Almost finished with the 400+ page php book been at it for a few weeks straigt reading all about it
Looks nice. That's a pretty awesome idea gonna have to give it a test. Almost finished with the 400+ page php book been at it for a few weeks straigt reading all about it
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

10-20-08 04:23 AM
BigBob85 is Offline
| ID: 73461 | 14 Words

BigBob85
Level: 151

POSTS: 5917/6381
POST EXP: 217397
LVL EXP: 42856506
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
So long as you put your reading into practice, it'll all be fine .
So long as you put your reading into practice, it'll all be fine .
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1596 days
Last Active: 1230 days

10-22-08 12:17 AM
is Offline
| ID: 73540 | 21 Words


JigSaw
Level: 164


POSTS: 894/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
This php login page is killing me Been at it since 8am its not 11pm still not getting it to work
This php login page is killing me Been at it since 8am its not 11pm still not getting it to work
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

10-22-08 06:25 PM
BigBob85 is Offline
| ID: 73596 | 11 Words

BigBob85
Level: 151

POSTS: 5924/6381
POST EXP: 217397
LVL EXP: 42856506
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
Whats the problem with it, talk to me later on messenger.
Whats the problem with it, talk to me later on messenger.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1596 days
Last Active: 1230 days

10-23-08 10:41 AM
is Offline
| ID: 73616 | 13 Words


JigSaw
Level: 164


POSTS: 896/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
Thank you PHP master Saved the day!!! Infact, you probably saved months
Thank you PHP master Saved the day!!! Infact, you probably saved months
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

10-23-08 05:08 PM
BigBob85 is Offline
| ID: 73626 | 6 Words

BigBob85
Level: 151

POSTS: 5925/6381
POST EXP: 217397
LVL EXP: 42856506
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
No problems. Im here to help.
No problems. Im here to help.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1596 days
Last Active: 1230 days

10-25-08 12:31 PM
is Offline
| ID: 73678 | 19 Words


JigSaw
Level: 164


POSTS: 897/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
Ops I should have pressed edit button instead of back now i got 2 posts... my question is below.
Ops I should have pressed edit button instead of back now i got 2 posts... my question is below.
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

(edited by JigSaw on 10-25-08 12:33 PM)    

10-25-08 12:31 PM
is Offline
| ID: 73679 | 88 Words


JigSaw
Level: 164


POSTS: 898/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
I've got a weird glitch going on with sessions not sure what it could be. When I use echo $_SESSION["username"]; it displays the username on some pages and doesn't on others, it's really random as well so it doesn't always appear on same page. If you refresh page it disappears and reappears. All pages have session_start(); at top and the echo I have above is placed in a seperate header file so it should do the same on all pages but isn't Any clue what is wrong?
I've got a weird glitch going on with sessions not sure what it could be. When I use echo $_SESSION["username"]; it displays the username on some pages and doesn't on others, it's really random as well so it doesn't always appear on same page. If you refresh page it disappears and reappears. All pages have session_start(); at top and the echo I have above is placed in a seperate header file so it should do the same on all pages but isn't Any clue what is wrong?
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

10-25-08 06:50 PM
BigBob85 is Offline
| ID: 73682 | 26 Words

BigBob85
Level: 151

POSTS: 5928/6381
POST EXP: 217397
LVL EXP: 42856506
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
No idea.. never used sessions.
Be sure to read your source, maybe its being echoed, but its in between some html tags and just isnt visible.
No idea.. never used sessions.
Be sure to read your source, maybe its being echoed, but its in between some html tags and just isnt visible.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1596 days
Last Active: 1230 days

12-26-08 07:10 PM
is Offline
| ID: 76413 | 12 Words


JigSaw
Level: 164


POSTS: 1106/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
ARgggg I really need to start working on PHP again... falling behind
ARgggg I really need to start working on PHP again... falling behind
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

12-27-08 06:46 PM
BigBob85 is Offline
| ID: 76454 | 23 Words

BigBob85
Level: 151

POSTS: 6026/6381
POST EXP: 217397
LVL EXP: 42856506
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
A friend (who does webdev) seen a site im working on. Says I should be getting AU$50/hour for the work I do
A friend (who does webdev) seen a site im working on. Says I should be getting AU$50/hour for the work I do
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1596 days
Last Active: 1230 days

12-27-08 07:51 PM
is Offline
| ID: 76469 | 44 Words


JigSaw
Level: 164


POSTS: 1113/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
OMG, well yea your a programmer... really good two and your also young. I looked at the stats from my college and the entry salery for programming starts at $60,000 thats really good if you ask me

BTW what's the site? I wanna see
OMG, well yea your a programmer... really good two and your also young. I looked at the stats from my college and the entry salery for programming starts at $60,000 thats really good if you ask me

BTW what's the site? I wanna see
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

12-28-08 10:17 AM
BigBob85 is Offline
| ID: 76498 | 12 Words

BigBob85
Level: 151

POSTS: 6031/6381
POST EXP: 217397
LVL EXP: 42856506
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
Will get you to beta test it in a few days
Will get you to beta test it in a few days
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1596 days
Last Active: 1230 days

12-28-08 12:00 PM
is Offline
| ID: 76500 | 1 Words


JigSaw
Level: 164


POSTS: 1116/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
Awesome
Awesome
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

02-15-09 02:32 PM
is Offline
| ID: 80735 | 49 Words


JigSaw
Level: 164


POSTS: 1295/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
So BigBob do you have the site up for me to beta test yet?

Finally figured out sessions, it's amazing how much filename locations can screw up how they work had to use ../../ instead of full address Experimenting is the best way to learn woot lol.
So BigBob do you have the site up for me to beta test yet?

Finally figured out sessions, it's amazing how much filename locations can screw up how they work had to use ../../ instead of full address Experimenting is the best way to learn woot lol.
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

02-15-09 10:21 PM
BigBob85 is Offline
| ID: 80774 | 31 Words

BigBob85
Level: 151

POSTS: 6251/6381
POST EXP: 217397
LVL EXP: 42856506
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
So how do sessions work, can you give me a quick rundown? They seem something I'd like to use.. From what I know, its just a cookie on the server side.
So how do sessions work, can you give me a quick rundown? They seem something I'd like to use.. From what I know, its just a cookie on the server side.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1596 days
Last Active: 1230 days

02-16-09 12:24 AM
is Offline
| ID: 80781 | 156 Words


JigSaw
Level: 164


POSTS: 1305/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
Basically they work like cookies except they are better for security issues because they get trashed when you close your browser. They are pretty easy to work as well here is how they basically work:

Start the session on the login page here is a quick example:

session_start();
$_SESSION['user'] = $user;
header ('Location: controlpanel or wherever');

Then on every page you need to put session_start(); at the VERY top of each page as in the first line because they need to be read before the page loads. And basically there are no limits to what you can do. They can be fun to work with I would just be careful of where you are locating files at because that is where I found trouble.

Example I found it best to use this:

header ('Location ../editprofile.php');

instead of

header ('Location http://www.mysite.com/editprofile.php');

The sessions seem to not pass through well with whole addresses from what I have seen.
Basically they work like cookies except they are better for security issues because they get trashed when you close your browser. They are pretty easy to work as well here is how they basically work:

Start the session on the login page here is a quick example:

session_start();
$_SESSION['user'] = $user;
header ('Location: controlpanel or wherever');

Then on every page you need to put session_start(); at the VERY top of each page as in the first line because they need to be read before the page loads. And basically there are no limits to what you can do. They can be fun to work with I would just be careful of where you are locating files at because that is where I found trouble.

Example I found it best to use this:

header ('Location ../editprofile.php');

instead of

header ('Location http://www.mysite.com/editprofile.php');

The sessions seem to not pass through well with whole addresses from what I have seen.
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

(edited by JigSaw on 02-16-09 12:26 AM)    

02-16-09 09:20 PM
BigBob85 is Offline
| ID: 80852 | 9 Words

BigBob85
Level: 151

POSTS: 6258/6381
POST EXP: 217397
LVL EXP: 42856506
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
header( just redirects though, is it needed for sessions?
header( just redirects though, is it needed for sessions?
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1596 days
Last Active: 1230 days

02-17-09 12:36 AM
is Offline
| ID: 80865 | 68 Words


JigSaw
Level: 164


POSTS: 1312/7936
POST EXP: 584185
LVL EXP: 57373592
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
Well it depends on how your making sessions. The header is definitly needed for the login page to direct the user to the control panel but it isn't needed on other pages. I just use header redirects for pages that require someone to be logged in, if a session is not in play and they try to access a restricted page it redirects them back to login page.
Well it depends on how your making sessions. The header is definitly needed for the login page to direct the user to the control panel but it isn't needed on other pages. I just use header redirects for pages that require someone to be logged in, if a session is not in play and they try to access a restricted page it redirects them back to login page.
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1726 days
Last Active: 1721 days

Links

Page Comments


This page has no comments

Adblocker detected!

Vizzed.com is very expensive to keep alive! The Ads pay for the servers.

Vizzed has 3 TB worth of games and 1 TB worth of music.  This site is free to use but the ads barely pay for the monthly server fees.  If too many more people use ad block, the site cannot survive.

We prioritize the community over the site profits.  This is why we avoid using annoying (but high paying) ads like most other sites which include popups, obnoxious sounds and animations, malware, and other forms of intrusiveness.  We'll do our part to never resort to these types of ads, please do your part by helping support this site by adding Vizzed.com to your ad blocking whitelist.

×