Search found 16 matches

by icey2k
Tue May 13, 2014 1:57 pm
Forum: Tutorials
Topic: User profile tutorial
Replies: 1
Views: 2210

Re: User profile tutorial

Try removing the , from `gender`,
by icey2k
Sat May 10, 2014 8:35 pm
Forum: PHP
Topic: please help with regular expression
Replies: 1
Views: 2518

Re: please help with regular expression

You can use substr() ?

[syntax=php]
$str = "http://youtube.com/watch?v=12324567";
$start = strpos($str, "=");

$newstr = substr($str, $start);
$newstr[0] = "";
echo $newstr;
[/syntax]
Probably not the best way of doing it, but it does the job.
by icey2k
Mon May 05, 2014 11:41 am
Forum: SQL
Topic: Selecting the highest-minimum value?
Replies: 0
Views: 3058

Selecting the highest-minimum value?

Im trying to make an IP-address register in php/mysql. And I want a function to get the "first avalible", but I'm not sure on how to do this.. (Not even sure if the forum is still somewhat active?) Say you have a table with 192.168.0.1, 192.168.0.2, 192.168.0.3, 192.168.0.4, 192.168.0.5.. ...
by icey2k
Thu Dec 01, 2011 9:35 am
Forum: Tutorials
Topic: PHP Registation/Login System Problem
Replies: 15
Views: 1910

Re: PHP Registation/Login System Problem

Altho this wont cause that error, I thought I'd just point it out.

[syntax=php]
foreach ($errors as $error){
echo "<li>{error}</li>";
}
[/syntax]
is missing a $

Other than the dirname(__FILE__); in init.inc.php. I see only html errors in the login.php file.
by icey2k
Mon Oct 31, 2011 12:21 pm
Forum: Tutorials
Topic: Blog problem with "DATE_FORMAT"
Replies: 5
Views: 1302

Re: Blog problem with "DATE_FORMAT"

xatron wrote:What?
Where do i missed something?

[syntax=php] DATE_FORMAT(`comments`,`last_comment`, `%d/%m/%Y %H:%i:%s`) AS `date`) AS `lastcomment`[/syntax]
by icey2k
Wed Oct 12, 2011 8:30 pm
Forum: Suggestions
Topic: IRC?
Replies: 22
Views: 6421

Re: IRC?

He has a server so why not just run an eggdrop? or a bnc, no need for bots if he has a stable server I was quite the IRC-geek back in the days.. Thank God thats changed.. Sooo many hours scripting on a useless script.. EDIT: OH NOES! I dugg up an "old" post! Note to self: Learn to read fir...
by icey2k
Wed Oct 12, 2011 8:19 pm
Forum: Tutorials
Topic: Use profile script isn't working
Replies: 9
Views: 1897

Re: Use profile script isn't working

peterr wrote:
[syntax=php]
$result = mysql_query('SELECT 'id' AS 'id', 'username' AS 'username' FROM 'users'');
[/syntax]

It should be
[syntax=sql]SELECT `id`, `username` FROM `users`[/syntax]


You've switched on ` and '
by icey2k
Wed Oct 12, 2011 6:27 am
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1457

Re: Two parse errors and one smaller issue with user account

Your missing a $ in your {path} should be {$path} :-)

Thats the only error i can spot.
by icey2k
Tue Oct 11, 2011 6:01 am
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1457

Re: Two parse errors and one smaller issue with user account

Could you post your full code?

It might be that you've forgotten a } somewhere :-)
by icey2k
Mon Oct 10, 2011 12:32 pm
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1457

Re: Two parse errors and one smaller issue with user account

That should be

[syntax=php]
$_SESSION['username'] = htmlentities($_POST['username']);
[/syntax]
by icey2k
Mon Oct 10, 2011 7:41 am
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1457

Re: Two parse errors and one smaller issue with user account

Deer wrote:Parse error: syntax error, unexpected '{', expecting '(' in /home/username/public_html/register.php on line 17" Here's line 17: if (empty{$_POST['password']) || empty($_POST['repeat_password'])){


You got an { where it should be (.

(empty{$_POST['password'])
by icey2k
Fri Oct 07, 2011 11:07 am
Forum: JavaScript
Topic: jQuery/JavaScript based editors.
Replies: 0
Views: 816

jQuery/JavaScript based editors.

I don't understand why I don't get any of those to work on my site. I download all files, but them in the directories, correct the <script/link> tags, and whatever else needs to be done. But when I upload it to my server and try to view it, I see only the regular <textarea>sometext</textarea> Latest...
by icey2k
Tue Sep 20, 2011 6:39 am
Forum: PHP
Topic: Basic template system
Replies: 6
Views: 940

Re: Basic template system

I guess I got unlucky on that query, its usually under 0.00004 =p
by icey2k
Mon Sep 19, 2011 7:11 pm
Forum: PHP
Topic: Basic template system
Replies: 6
Views: 940

Re: Basic template system

I figured it out.. Apparently my vps cant connect to database from external ip.. so I had to use localhost..

Anyways.. Thanks :lol: :lol: :lol:
by icey2k
Mon Sep 19, 2011 6:20 pm
Forum: PHP
Topic: Basic template system
Replies: 6
Views: 940

Re: Basic template system

Try running the SQL in phpmyadmin. Most likely, you have messed up the JOIN somehow so that it returns 0 rows all the time. Noo, I've checked that 10 times now, and it returns correctly. "Showing rows 0 - 0 (1 total, Query took 0.4887 sec)" When I removed the get_posts(); function the sit...
by icey2k
Mon Sep 19, 2011 5:44 pm
Forum: PHP
Topic: Basic template system
Replies: 6
Views: 940

Basic template system

Hey guys, I'm just wondering if its possible to combine a "blog tutorial"-lookalike, and the basic template system from the tutorial? I get things working, but as soon as I start getting data from the database in the home.page.inc.php file, nothing is listed. This is what my home.page.inc....