Search found 32 matches

by Dominion
Fri Aug 19, 2011 4:28 pm
Forum: PHP
Topic: should I make a database class? init.inc.pnp file
Replies: 2
Views: 793

Re: should I make a database class? init.inc.pnp file

If you're after a connection identifier then it's - $data = mysql_connect('','',''); $database = mysql_select_db('',$data); Then use $database. As for calling them in another file, if the file is included so are all set values e.g. if the above is connect.php include 'connect.php'; // can call other...
by Dominion
Sun Aug 07, 2011 12:14 pm
Forum: PHP
Topic: OOP?
Replies: 20
Views: 3884

Re: OOP?

The problem with OOP in php is next to some languages the Object orientated version is strange. The idea is to load only what you need, and yet by default php has a large library of functions to load for you... I would suggest you look into the basics of an OOP based programming languages (e.g. Pyth...
by Dominion
Sat Jul 16, 2011 1:57 pm
Forum: Tutorials
Topic: How to Secure IDs For a MySQL Query
Replies: 6
Views: 4496

Re: How to Secure IDs For a MySQL Query

Php does have the abs() function for making sure a number is positive.
by Dominion
Sat Jul 16, 2011 1:31 pm
Forum: General Chat
Topic: Poll that may annoy jacek
Replies: 6
Views: 1243

Re: Poll that may annoy jacek

I found phpAcademy though another forum, and that via yet another forum. Its how people find new sites and being on many often means you’re up to date with current php events. As for phpAcademy being the “Key” I disagree. The Key will be to bring more members that are not on there or, if at all poss...
by Dominion
Mon Jul 11, 2011 12:22 pm
Forum: PHP
Topic: Showing IP Address of the visitor
Replies: 22
Views: 3673

Re: Showing IP Address of the visitor

I don't know if I need eval or not, it was what I found on the web. I am not storing IP's in the database. This is the only post I will ever show IP of the visitor. Think about sites like whatismyip.com etc. More or less what has already been said then... <?php // some of the file echo 'Your IP is ...
by Dominion
Mon Jul 11, 2011 11:56 am
Forum: PHP
Topic: Showing IP Address of the visitor
Replies: 22
Views: 3673

Re: Showing IP Address of the visitor

Sorry, but why do you need eval to show something like an ip from the database? Just grab it with a query, and show it.
$sql = mysql_query("SELECT `user_ip` FROM `somewhere` WHERE...");
$user = mysql_fetch_assoc($sql);
echo 'your ip is '. $user['ip_name'];
by Dominion
Mon Jun 06, 2011 4:28 pm
Forum: General Chat
Topic: What do you want on your profile page ?
Replies: 37
Views: 5320

Re: What do you want on your profile page ?

I don't use any of the stuff on any forums that say "customize this" it's kind of pointless. That's what I want to change ;) How about making it more like a social networking profile ? with an activity feed, comments and all that nonsense ? Thought you were asking what could be left out f...
by Dominion
Mon Jun 06, 2011 3:30 pm
Forum: General Chat
Topic: What do you want on your profile page ?
Replies: 37
Views: 5320

Re: What do you want on your profile page ?

I don't use any of the stuff on any forums that say "customize this" it's kind of pointless. saying that if you have something like a banner that links back to the profile it can be free advertising... and people use them. :lol:
by Dominion
Fri Jun 03, 2011 1:07 pm
Forum: General Chat
Topic: Cookies VS Sessions
Replies: 9
Views: 1884

Re: Cookies VS Sessions

Cookies for a login can be fine, but you must encrypt any data stored in them. To be honest sessions are better for it. Yes people use cookies as both "remember me" functions, and for login's.
by Dominion
Fri Jun 03, 2011 12:54 pm
Forum: PHP
Topic: Php else.
Replies: 3
Views: 1020

Re: Php else.. [ SOLVED ]

when using if() {} elseif () {} 's you should only have "else" on it's own for if all if() have failed. having a random else, then an elseif will not work. it works i just had it the wrong way around As i said you can't have a random else in the middle of elseif()'s has to be at the end.....
by Dominion
Fri Jun 03, 2011 12:51 pm
Forum: PHP
Topic: Php else.
Replies: 3
Views: 1020

Re: Php else.. [ SOLVED ]

when using if() {} elseif () {} 's you should only have "else" on it's own for if all if() have failed. having a random else, then an elseif will not work.
by Dominion
Thu Jun 02, 2011 8:54 pm
Forum: PHP
Topic: submit form not working
Replies: 3
Views: 990

Re: submit form not working

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body> <?php if (isset($_POST['name'],$_POST['email'],$_POST['company'],$_POST['message'])) { $name=$_POST['name']; $email=$_POST['email']; $company=$_POST['...
by Dominion
Thu Jun 02, 2011 3:41 pm
Forum: General Chat
Topic: Probably No Video This Week :(
Replies: 71
Views: 10040

Re: Probably No Video This Week :(

*makes a note not use use the service jacek has used*
by Dominion
Thu Jun 02, 2011 2:46 pm
Forum: General Chat
Topic: What is your favorite text editor?
Replies: 19
Views: 2905

Re: What is your favorite text editor?

Notepad++ for any quick edits. Netbeansfor anything more then that.
by Dominion
Tue May 31, 2011 5:06 pm
Forum: PHP
Topic: image manipulation php mysql blob type
Replies: 6
Views: 1594

Re: image manipulation php mysql blob type

The extra load is why loading time become ridiculously high. Yes a picture is just data, but not data this type of database is optimized for.
by Dominion
Tue May 31, 2011 1:29 pm
Forum: PHP
Topic: image manipulation php mysql blob type
Replies: 6
Views: 1594

Re: image manipulation php mysql blob type

You may want to explain that loading time for stored images is ridiculously high, and the it's been designed to store data not images rather then just saying it's bad?
Your best bet it to store the files. If you need the path to the files in the database so be it.
by Dominion
Mon May 30, 2011 3:30 pm
Forum: PHP
Topic: select from one table insert to another
Replies: 7
Views: 1312

Re: select from one table insert to another

ORDER BY RAND() <- you should never use order by RAND().
by Dominion
Sat May 28, 2011 10:32 pm
Forum: Suggestions
Topic: PHP Game
Replies: 12
Views: 2647

Re: PHP Game

To go massively off-topic, would videos on javascript or html/css things be good ? Or should I stick with php ? just basic one player things? No fun unless it's multiplayer ;) It would be nice to see someone do something with Js without using Jquery :lol: Well there are a fair few basic game engine...
by Dominion
Sat May 28, 2011 10:27 pm
Forum: Suggestions
Topic: PHP Game
Replies: 12
Views: 2647

Re: PHP Game

Php game : rather open don't you think?
Would you want it all php, some Js in it (makes one play games more fun online...), and also what kind of "game" do you want here? a tutorial series to make the bare-bones of a game site/ just basic one player things?
by Dominion
Sat May 28, 2011 10:22 pm
Forum: Suggestions
Topic: IRC?
Replies: 22
Views: 8883

Re: IRC?

Due to using mibbits server the client I almost always use cannot connect, however i am in there every now, and then. :?
by Dominion
Sun May 22, 2011 10:39 pm
Forum: Code
Topic: BetterPHP PHP Library
Replies: 102
Views: 43478

Re: BetterPHP PHP Library

What kind of things are you looking for? My library has a fair few security check functions, but all the more useful functions I use tend to be site specific. Would I be able to add some JS functions?
btw - Js functions != using Jquery ;)