Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for gorleone

Hi guys, I have a maybe simple question, but I'm wonder how they do this: [http://www.blacknegative.com/#!/adisseo/](http://www.blacknegative.com/#!/adisseo/) background image scale perfect in all screen resolution (even 2560x1440 or 800x1280), and the background picture is only ~1000 x 1000 pixels. I make similar effect with <img src=""> and some javascript, but they …

Member Avatar for gorleone
0
183
Member Avatar for gorleone

Hey guys, what the best practice for session check without duplicate code. I mean when check the session in some controller I have to duplicate the code to other controller, and that is not a good idea. <?php [CODE]class Ctrl extends Controller { private function _ses_check() {...} } class Second_ctrl …

Member Avatar for pritaeas
0
162
Member Avatar for gorleone

Hi Guys, I have a 2 errors with PDO: Sometimes give me this error: Connection error, because: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111 Other time sent me this: SQLSTATE[42000] [1203] User [MYUSERNAME] already has more than 'max_user_connections' active connections This is …

Member Avatar for gorleone
0
143
Member Avatar for gorleone

Have a interesting problem. I make a little ajax mechanism to get info from php file and add a function for delete the data. phpfile.php: [CODE] <?php if(isset($_POST['bu'])){ $data = 'text<a onclick="something();" href="#">alert</a>'; echo $data; } ?> [/CODE] js file: [CODE] function getdatafromfile(){ var bu = 'bu'; $.ajax({ type: 'POST', …

Member Avatar for Airshow
0
370
Member Avatar for azdonald

Good day, I'm trying to build an online quiz for my website. i want to do it oop style but i'm having problems in certain areas but i'll need help. this is the class code [CODE]class Quiz{ // method to get the questions and answers public function getQuestion(){ $host="localhost"; // …

Member Avatar for mschroeder
0
124
Member Avatar for gorleone

[CODE] <?php class Database { public function protect($data){ $data = trim($data); $data = stripslashes($data); $data = strip_tags($data); $data = mysql_real_escape_string($data); return $data; } } $database = new Database(); $txt = '<strong>\\\Test///</strong>'; $txt = $database->protect($txt); echo $txt; [/CODE] And output have a <strong> tag, slashes and all with zero errors. I …

Member Avatar for diafol
0
142
Member Avatar for gorleone

Hello guys, last time I learn php and make some scripts that work on my localhost, but not in a hosting which I use. Example: checklogin.php: [code]<?php ob_start(); $host=""; $username=""; $password=""; $db_name=""; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername …

Member Avatar for diafol
0
372
Member Avatar for lisaroy1
Member Avatar for novice02
0
145