TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Showing results 1 to 25 of 68
Search took 0.15 seconds.
Search: Posts Made By: Tanax
Forum: The Lounge 10-06-2009, 05:39 PM
Replies: 2
Views: 717
Posted By Tanax
I might have some from when I was a beginner....

I might have some from when I was a beginner. I'll check them and PM you if I have any.
Forum: Advanced PHP Programming 08-19-2009, 10:09 AM
Replies: 10
Views: 753
Posted By Tanax
In your table for the comments, use a row for...

In your table for the comments, use a row for pageId that stores the ID of the page the comment is associated with. Then on the page, you just fetch the comments with pageId = $_GET['id']. Remember...
Forum: General 07-02-2009, 10:44 AM
Replies: 9
Views: 1,490
Posted By Tanax
Something quite cool is also the use keyword. I...

Something quite cool is also the use keyword. I don't know if it's specifically for the anonymous functions, but it's great 'cause then you can pass in variables into functions that you need, but...
Forum: Absolute Beginners 04-18-2009, 12:48 PM
Replies: 10
Views: 728
Posted By Tanax
Yah, remember that the code I used for that...

Yah, remember that the code I used for that pagination class I wrote is quite old. Anyhow, to the function, I just returned an array because I felt it would be easier.

You however, could create 2...
Forum: Script Giveaway 04-18-2009, 12:31 PM
Replies: 21
Views: 2,072
Posted By Tanax
Same thing goes for $_POST, $_GET and $_REQUEST...

Same thing goes for $_POST, $_GET and $_REQUEST for example
Forum: Script Giveaway 04-10-2009, 09:44 AM
Replies: 40
Views: 14,779
Posted By Tanax
It's not doing more things than what you need....

It's not doing more things than what you need. It's doing exactlyy what you need. It just CAN do other things aswell.

I don't use anything other than MySQL aswell, which is why my example usage of...
Forum: XHTML, HTML, CSS 02-26-2009, 09:43 PM
Replies: 15
Views: 966
Posted By Tanax
We're going pretty offtopic right now. But I...

We're going pretty offtopic right now. But I don't really know how to check that, cause I haven't really thought about it more in-depth. But if I would begin on a project like SN, I could definitly...
Forum: Advanced PHP Programming 01-26-2009, 09:53 AM
Replies: 5
Views: 3,090
Posted By Tanax
You will simply have to provide it in the...

You will simply have to provide it in the arguments, if you read the descriptions of the functions, you will see that it's pretty easy to understand.


$p = $_GET['page'];

$result =...
Forum: General 12-16-2008, 11:31 AM
Replies: 5
Views: 623
Posted By Tanax
Short answer: yes. PhpGD is the way to...

Short answer: yes.

PhpGD is the way to go.
However, not everyone have it enabled, so you have to check if you have it on your webhost.
Forum: General 12-14-2008, 01:37 PM
Replies: 8
Views: 972
Posted By Tanax
class database { public function connect($host,...

class database
{
public function connect($host, $username, $password)
{
mysql_connect($host, $username, $password);
return $this;
}

public function select($db)
{
Forum: Absolute Beginners 11-28-2008, 10:35 AM
Replies: 27
Views: 2,459
Posted By Tanax
Yes you can use the same variable name on all...

Yes you can use the same variable name on all functions.
However, there already is a function called "stripslashes" for example, and you cannot use the same name as an already existing function. I...
Forum: Absolute Beginners 11-28-2008, 07:54 AM
Replies: 27
Views: 2,459
Posted By Tanax
Mm better :-) You could go for a fetch function...

Mm better :-)
You could go for a fetch function which would fetch an array?
Also you could design a secure function which would secure the specified string from mysql injections, and then return the...
Forum: Absolute Beginners 11-28-2008, 12:04 AM
Replies: 27
Views: 2,459
Posted By Tanax
You don't set $this->dbquery anywhere. You...

You don't set $this->dbquery anywhere.
You haven't even defined $dbquery anywhere.
You defined $query, which isn't used anywhere.
You used var $query, instead of private $query, which would be the...
Forum: Absolute Beginners 11-27-2008, 10:56 AM
Replies: 27
Views: 2,459
Posted By Tanax
I just thought of something else, that you would...

I just thought of something else, that you would take great advantage of.

When you create your user class, in your construct, or in a setdb function, set a DB variable, something like this:


class...
Forum: Absolute Beginners 11-27-2008, 09:37 AM
Replies: 27
Views: 2,459
Posted By Tanax
The first thing I would do, is to create a DB...

The first thing I would do, is to create a DB class that manages all the querys and all that.

After you got your DB class, you would begin creating a config file, where you start all your classes,...
Forum: General 11-24-2008, 11:47 AM
Replies: 2
Views: 946
Posted By Tanax
My tip: Read the descriptions of the different...

My tip: Read the descriptions of the different forums so you know which one to post in, because this is totally in the wrong section.
Forum: Advanced PHP Programming 11-17-2008, 11:51 AM
Replies: 13
Views: 840
Posted By Tanax
What does all those x20, x5c and all that in the...

What does all those x20, x5c and all that in the expression means?
Forum: Absolute Beginners 11-16-2008, 06:53 PM
Replies: 9
Views: 932
Posted By Tanax
public function loadFetch($assoc = FALSE, $sql =...

public function loadFetch($assoc = FALSE, $sql = NULL) {

unset($this->query_fetch);
empty($this->query_fetch);

if($sql == NULL)
{

if(isset($this->query_result))
{
Forum: Feedback 11-12-2008, 11:30 AM
Replies: 0
Views: 985
Posted By Tanax
Approval

Can someone approve(spelling?) the article in tips and tricks?
I don't know if you've noticed it, but anyways, just thought I'd give you a heads up.
Forum: Absolute Beginners 11-12-2008, 09:02 AM
Replies: 4
Views: 850
Posted By Tanax
Nevermind again xD I solved it thanks to...

Nevermind again xD I solved it thanks to Eyedentify :-)
Forum: General 11-09-2008, 11:23 AM
Replies: 23
Views: 1,613
Posted By Tanax
Hm, ye okey. Your idea is good, but say you have...

Hm, ye okey. Your idea is good, but say you have 1000 users, and everyone rates everyone, then you'd have 1000*1000 entries in your ratings db, which is.. quite alot. If you would do it my way, you...
Forum: General 11-09-2008, 12:23 AM
Replies: 23
Views: 1,613
Posted By Tanax
@up- So.. how do you add rating to the user? If I...

@up- So.. how do you add rating to the user? If I rate someone as 3 of 5, then what will be inserted into db?

And also, how do you count how many ppl have rated?
Forum: General 11-08-2008, 11:43 PM
Replies: 23
Views: 1,613
Posted By Tanax
Yah :) I have no idea what the estimates was. But...

Yah :) I have no idea what the estimates was.
But the basic idea here is that you have a table "ratings".

id, productid(or w.e id you have on the thing that is being rated), 1, 2, 3, 4, 5

Then when...
Forum: General 11-08-2008, 03:22 PM
Replies: 23
Views: 1,613
Posted By Tanax
Just .. lol hehe xD Take (4*5) + (2*1) + (if you...

Just .. lol hehe xD
Take (4*5) + (2*1) + (if you have 3 "2" ratings= 3*2, etc.)/ (4+2+3) <- the total amount of ppl who have rated

Then you'll get an avarage of say 4,3 or w.e it is(didn't check)....
Forum: Member Introductions 11-06-2008, 07:34 AM
Replies: 8
Views: 770
Posted By Tanax
I can relate so much to you about the relying...

I can relate so much to you about the relying thing.

Welcome to the site, hope you enjoy your stay here and that you find what you're looking for!

And you aren't possibly Runar from otfans? :-)
Showing results 1 to 25 of 68

 

All times are GMT. The time now is 06:32 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design