Search found 46 matches

by hunterhp
Fri Feb 04, 2005 9:30 am
Forum: PHP - Code
Topic: about $message .= "xxx";
Replies: 2
Views: 493

about $message .= "xxx";

I know that what .= does, but does it improve performance/speed? I mean, can't you just do $message = "<html> <head> ect ect"; instead of $message = "<html>"; $message .= "<head>"; $message .= "ect ect"; What's the difference, and which is better/more user-end...
by hunterhp
Tue Feb 01, 2005 12:57 pm
Forum: PHP - Code
Topic: insert statement
Replies: 3
Views: 861

So what's the problem?
by hunterhp
Tue Feb 01, 2005 12:31 pm
Forum: PHP - Code
Topic: [SOLVED] Counting words in a string
Replies: 2
Views: 645

preg_match_all should do the trick I think.
by hunterhp
Tue Feb 01, 2005 12:28 pm
Forum: PHP - Code
Topic: [SOLVED] Help with Preg_replace
Replies: 7
Views: 1515

Awesome, that worked, thanks a lot feyd.
by hunterhp
Tue Feb 01, 2005 12:27 pm
Forum: Miscellaneous
Topic: FTP which program do you use?
Replies: 16
Views: 5859

Core FTP has never crashed on me, it's the best FTP i've used(I've used Cute FTP, and WSFTP)
by hunterhp
Tue Feb 01, 2005 12:21 pm
Forum: PHP - Code
Topic: [SOLVED] Help with Preg_replace
Replies: 7
Views: 1515

I'm afraid it's still the same outcome :(

http://hunterhp.freeownhost.com/tournament.php

If you add a new tournament, that tournament then becomes repeated over and over, as the ORDER BY id is set on the query.
by hunterhp
Tue Feb 01, 2005 11:27 am
Forum: PHP - Code
Topic: [SOLVED] Help with Preg_replace
Replies: 7
Views: 1515

I tried changing $this->html = preg_replace(); with $this->output = preg_replace(); (Note: I already did declared $output as a variable.) And it resulted in the text not being replaced ({name} showed up as {name} ect.) I don't understand. When I said $this->html had the value of <a href=blablabla> I...
by hunterhp
Tue Feb 01, 2005 6:04 am
Forum: PHP - Code
Topic: [SOLVED] Help with Preg_replace
Replies: 7
Views: 1515

[SOLVED] Help with Preg_replace

Hi. I've been trying to preg_replace the same string with different values each time, but preg_replace stores the first value it was given, and only the first value. When I try changing it(Trying with a loop, and tried manually too) it keeps the same value. So does str_replace. Is there some way I c...
by hunterhp
Mon Jan 31, 2005 9:48 am
Forum: PHP - Code
Topic: Make date("s"); 30 in the future?
Replies: 8
Views: 977

Dale wrote:Ohhh... I get it :)

Thanks!
How come you didn't follow your own sig's advice?
by hunterhp
Mon Jan 31, 2005 7:01 am
Forum: PHP - Code
Topic: Someone please help
Replies: 7
Views: 2214

I still don't understand why AddTournament worked, and ViewTournament didn't.

What should I do different you think? Change my entire code?
by hunterhp
Mon Jan 31, 2005 6:34 am
Forum: PHP - Code
Topic: Someone please help
Replies: 7
Views: 2214

But I thought OOP was different? And how come it works for inserting values to the database(IE: AddTournaments). Here's the db.class one. <?php // Tourney Script, Started on January 31, 2005 at 1:00 A.M. class SQL&#123; var $dbc; var $result; function Connect() &#123; global $host, $user, $p...
by hunterhp
Mon Jan 31, 2005 6:24 am
Forum: PHP - Code
Topic: Someone please help
Replies: 7
Views: 2214

$DB is set on config.inc page.

As such.

$DB = new SQL; // From db.class

How come it worked for AddTournament though?
by hunterhp
Mon Jan 31, 2005 6:16 am
Forum: PHP - Code
Topic: Notice: Undefined Index.....
Replies: 6
Views: 1026

I don't uderstand why you would make a form value = $_POST. Don't you have to first Submit the value in order for $_POST to work? Can't you make it a $_GET value.
by hunterhp
Mon Jan 31, 2005 6:11 am
Forum: PHP - Code
Topic: Notice: Undefined Index.....
Replies: 6
Views: 1026

have you tried putting a colon( ; ) after the POST value?
by hunterhp
Mon Jan 31, 2005 5:59 am
Forum: PHP - Code
Topic: Someone please help
Replies: 7
Views: 2214

Someone please help

I don't understand the error I'm getting, and why I'm getting it. This code right here works perfectlly fine This is tournament.class function AddTournament() &#123; $title = $_POST&#1111;'name']; $game = $_POST&#1111;'game']; $tourney = $DB->Query("INSERT INTO tournaments VALUES ('...