
Ivan Ivković
Members-
Posts
139 -
Joined
-
Last visited
Never
Everything posted by Ivan Ivković
-
Is a way to execute php code which is stored in mysql database?
Ivan Ivković replied to Freid001's topic in PHP Coding Help
Try something like this: $string = $fetch['code']; // contains: echo "String"; eval($string); -
Can PHP dynamically change .htaccess files?
-
special character from db, GOOD ... from php, BAD
Ivan Ivković replied to dsdsdsdsd's topic in PHP Coding Help
Check your PHP file encoding. It should be UTF8. -
for($i = 0; $i < 0; $i++){ if (file_exists("images/".$id."/img0".$i .".jpg")) { echo "<a href=\"/v1/images/".$id."/img0".$i .".jpg\" rel=\"lightbox\"><img src=\"/v1/images/".$id."/thumb0".$i .".jpg\" class=\"img\" border=\"0\" width=\"60\" height=\"60\"></a> "; } }
-
if(!empty($_GET)){ // Load content. }else{ // Put a welcoming image. }
-
Does blank space really matter in performance?
Ivan Ivković replied to Ivan Ivković's topic in PHP Coding Help
Weird fetishes are the reason we're all here. -
Redirecting users to their own page after login
Ivan Ivković replied to efilleven's topic in PHP Coding Help
That's the way it should be. You definetly should not have name_lastname.php file formats in your site.. That's just... Plain wrong and messy. That would require you to have an endless amount of files for each user. As Colton Wagner said, these things are usually done by $_GET variables, or just extracting user_id from $_SESSION variable and filling the page according to that data. -
Does blank space really matter in performance?
Ivan Ivković replied to Ivan Ivković's topic in PHP Coding Help
Ok I'm programming an admin board, so that's not really nessessary then. So it's not a lot of extra processing power... But when I start developing large-scale I'll keep the backuping method in mind. -
Does blank space really matter in performance?
Ivan Ivković replied to Ivan Ivković's topic in PHP Coding Help
Such as? If there's smthn wrong in what you see, please gimme a tip. THANKS! So lesser the HTML spaces, but PHP intact? -
Do I really have to care about the amount of spaces/tabs I have in my program? Is my code good? Example: class SportListout{ public $start; public $db; private $junk = 'This is junk data. Unable to find it \'s parents. It is recommended that you delete this data.'; function __construct($db){ $this -> db = $db; $this -> setStartingParent(); } function searchListout($sp){ $notif = 'There are no search results that match that criteria.'; if(strlen($sp) > 0){ if(strlen($sp) < 3){ This is my common text format. Is this ok or should I not make spaces in between functions?
-
Remove this part? div#Text { /* <DIV>Text</DIV> */ position : absolute; left : 0.8cm; top : 13.5cm; width : 10.0cm; height : 5.5cm; }
-
Yea that may be because 'font' accepts only PT, while font-size can accept px, em, pt... You can't actually align it to center if you entered position: absolute; and stuff... These are possible solutions to orientation: <center> <div id="Text" class= "cc01"> <p> <?php ECHO $display_block; ?> </p> </div> </center> <div style='text-align: center;'> <div id="Text" class= "cc01"> <p> <?php ECHO $display_block; </div> ?> </p> </div> div#Text{ float: center; }
-
Try: .cc01 { /* Common */ font : 24px 'French Script MT' !important; color : #000000; } or .cc01 { /* Common */ font-family : 'French Script MT' !important; font-size : 24px; color : #000000; }
-
Sample drop down menu wont work, please help...
Ivan Ivković replied to Hall of Famer's topic in CSS Help
Try putting them into the same folder and replace the link with: <link rel="stylesheet" href="style.css" type="text/css" /> -
a{ color: blue; /* All links blue. */ } nav a{ color: red; /* All links in nav red. */ } I guess this'll do?
-
So yea, we mostly include our css via <link rel='stylesheet' type='text/css' href='style.css'/>, but I just found that I can make CSS work from an included PHP file in <style></style> tag printed out dynamically based on any settings I make. But the downside is that this ends up scattered around the HTML output. Does this reduce the performance in any way? I wish we could put PHP in css files.. :/ Please note that I'm new to programming.
-
If there's someone who likes to teach and help others, I'd like someone who can review my code once in a while... Just to know if I'm doing stuff wrong. No, I don't mean someone who would fix my code or help when I'm stuck. Just take a look at it when it's done and tell me if I'm doing something in the wrong way. Anyone who would want to, leave an inbox message or mail me at [email protected]
-
Based on SocialEngine, a lot of modifications. http://www.sportville.co What do you think?
-
Dzelenika, this is not what I meant. Thanks. ManiacDan, that's a GREAT IDEA! Thanks.
-
Yes, something like that. __set() is called when you try to set a value to a non-existing member. __get() is called when you try to access a non-existing member. I'm trying to find or 'create' a magic method that will respond when I try to access a member that does not have any value. I don't want to overoccupy my constructor... So I want that function to be independent.
-
Is there any way to produce a custom magic method? Let's say when I try to get an attribute that doesn't have any value, a method gets called that gives that attribute a value. So I want a method to be triggered when I try to get a value from an attribute that doesn't have any value.