Need advise on what php programming way to use

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rippie
Forum Commoner
Posts: 76
Joined: Sun Jan 10, 2010 11:32 am
Location: Nottingham

Need advise on what php programming way to use

Post by Rippie »

Hi everyone,

This might be a stupid question, but would very much like some clarification on something.

I am looking at object orientated php programming and i really like how when you go from page to page that you dont have newpage.php?id=$_POST['something'] . so just wondering is there a way without objects where i if i am on index.php and click on a link that takes me to newpage.php but on index.php i create a variable $myVar = "something"; and i still want to use that var on my newpage.php ?

If anyone have some good guides for object orientated programmers, please post them here.

I hope my wording dont cause too much confusion, i am basically just trying to figure out if it is worth getting my head around OO at this time of my learning curve.

Rippie
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Need advise on what php programming way to use

Post by AbraCadaver »

This doesn't have anything to do with OOP versus procedural code. To pass a var from one page to another as you have described you use sessions: http://us.php.net/manual/en/intro.session.php
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Rippie
Forum Commoner
Posts: 76
Joined: Sun Jan 10, 2010 11:32 am
Location: Nottingham

Re: Need advise on what php programming way to use

Post by Rippie »

Abra,

Cheers for that, interesting stuff :)
Post Reply