oni-kun
Members-
Posts
1,984 -
Joined
-
Last visited
-
Days Won
1
Everything posted by oni-kun
-
Hmm.. "parent::dislay($tpl);" You forgot the 'p'!
-
It couldn't have been '98 since the very first Stronghold game came out in 2001, but yeah it's quite old Yes I remember that exact cover! It was such an awesome game. You ever played Red Alert or Axis&Allies(my favourite)?
-
If it's the same game, I've played Stronghold when I was small (1998?) The original version. It's such an awesome game, I remember the Trebuches/Siege weapons and collecting wood/food etc. Man that brings back memories
-
"There are NO bugs. Anything you see that may be buggy, is actually A FEATURE!!" The dragging into a textbox, This is purely a Windows (clipboard) feature. If your specific version of Chrome is messing with it (Or some JS on a page overriding that clipboard function, such as Focus() ), than it may just be a specific problem for you. My fairly new 4.0.249.43 works fine with dragging into a standard/password field from a span or from another text box. Hmm.. I've come across many other bugs in chrome, such as not even attempting to restore a session after crash, and spontaneously the tabs stop working, a new tab opens a blank one and breaks the others.
-
Somewhere on your previous hosts control panel or whatnot should be a domain manager, look in their FAQ. Mine had the option to 'unlock domain' and 'retrieve auth code' which told the domain registrar to give me the auth code, and I was able to log into my registrar's account and add it to my new account. All you should need to change are the nameservers btw, don't worry about DNS as well. I had this problem with Webfusion, which is known for its horrible lack/non-existant support.. If that comes to no avail, You're the administrative address for your domain (WHOIS?) That means you own the domain, talk directly to your domain registrar to ask for an account with your e-mail, they should give you the auth code and whatnot.
-
Basically but what is with your OR and AND statements? You're saying if the date is larger than 0, equal to 0, or greater than 0 it'll redirect. Doesn't matter what you replace the time with, it'll always run. You need to use IF/ELSE's the proper way, if you want an example tell us more what you're trying to do and we'd be glad to write you one.
-
What on earth are you trying to do? if($A = 22 && $B = 54){ echo $A . "-" . $B . "<br>"; This will always be true. You can do if ($a == foo()) { $a = pass; } An IF statement is not for assigning.
-
I told you that you are assigning not comparing. If you wanted to use functions in an IF. look: <?php $a = 1; $b = 2; function foo(){ return 1; } function bar(){ return 2; } if ($a == foo() && $b == bar()) { echo "It works!" ; } ?> And it should work as expected. See how I used ==?
-
You are assigning variables in the IF, Not comparing them. if($A = 22 && $B = 54){ Should be if($A == 22 && $B == 54){ And just to note, you should not use short tags (i.e. <?), you should only used <?php
-
Yes, "dolphinmania.pandaandpenguin" will assume the top level domain is ".pandaandpenguin" Example: http://dolphinmania.pandaandpenguin/secure/index.php What it should be: http://dolphinmania.pandaandpenguin.com/secure/index.php
-
Note the value of the POST element in the form. It is value="edit", Therefor the $_POST['parse_var'] will POST as edit as the hidden value states. This may be meant to prevent bots from POST'ing a value, as they'd most likely not even see the hidden variable and the "$_POST['parse_var] == 'edit' " will be false.
-
Yes, you can place your page.php file for example in /secure/page.php (on your server) and on his server include it on theirs: <?php include('http://www.your_domain.com/secure/page.php'); ?> Note fopen and allow_url_include must be on in php.ini to allow this.
-
What do you mean? Nothing will ever parse within a <textarea> htmlspecialchars is pointless. <textarea><b>?</b><a href="foo" onClick="alert('bar');">baz<a/></textarea> See? Nothing will run if you put that in your browser. Further: You should use fread/fwrite( with the w attribute, to replace the file ), it shouldn't be a hard task. Further, adding AJAX into the solution will just cause security holes in the end, if you do not know what you are completely doing.
-
You may wish to use a CASE/SWITCH statement for this. And maybe your ifs can be more simplified or combined, but it doesn't look too bad.
-
You unlock the Model 1887 @ level 67[@SemiApocolyptic], Which is a hint, as it shouldn't be used too much, unless you want to cower from going into prestige (level 1 again!) Akimbo , you get after 10 kills with it. It should be like 150 or something, I don't get why unlocks are so easy or the way they are..
-
Having trouble appending a page redirect to a php function
oni-kun replied to green917's topic in PHP Coding Help
No problem! Glad I could be of help. -
Better yet. In spirit of these forums I shall write it in PHP with GD.
-
You can use strip_tags to remove any HTML along with mysql_real_escape_string. After you removed the HTML you should use nl2br BEFORE entering it into the database. What this function does is turns the 'invisible' \n's into <br/>'s for the database, which can obviously later output and return the linebreaking as it was. Not a single question can not be answered by looking in the documentation, The examples are purely what make it easy for beginners. I'd recommend you look further up tutorials on how to perform these tasks, It's shouldn't be too hard.
-
You can use a simple function such as this: <?php $str = "p324u13820"; //The string you want separated $split = (explode('u', $str)); $u = $split[1]; $split2 = (explode('p', $split[0])); $p = $split2[1]; echo "User id $u posted (link) from page $p"; //Not sure where you get the link from, you can put there. ?> Returns "User id 13820 posted (link) from page 324" Note this will allow you to have any length user/page string. explode
-
Possible to use/execute php codes in a mysql table?
oni-kun replied to slyte33's topic in PHP Coding Help
Try this: <?php eval(' $string = "this"; echo $string . " - "; echo strlen($string); '); ?> And you'll notice it'll parse that very PHP code. You can pull it out of the database and wrap it within eval(). Just note you don't need the tags, you should strip them out. Just the code is fine with the function. -
I guess if anyone wants to add me, My ID is oni-kun1337 - We should make our own clan, PHP! PS3 though.
-
Why re-invent the wheel? I'm sure you can just use Google's analytics tracker, or an Apache logging parsing software such as AWStats. It basically does more than PHP can, atleast in the scope of one programmer for analytics and should display most viewed pages, exit/entrance pages etc, well, actually hundreds of useful tidbits, many are free.
-
Possible to use/execute php codes in a mysql table?
oni-kun replied to slyte33's topic in PHP Coding Help
Yes, You can use the command eval to do this very purpose. But I warn you, Make 100% sure that what goes into it is sanitized and safe. You don't want arbituary commands being shoved in there, that can be durastic. -
Having trouble appending a page redirect to a php function
oni-kun replied to green917's topic in PHP Coding Help
A header should not be sent before any content (ie any PHP tags). If you wish to send a header after the content, which is not 100% correct.. but you must place ob_start after your first opening php tag, without any whitespace beforehand: <?php ob_start(); //Start output buffer for header EDIT: There IS a sticky in this exact forum..... http://www.phpfreaks.com/forums/index.php/topic,37442.0.html -
No problem! I spoke from experience when I first made a contact form.. Since your problem is solved, hit the 'Topic Solved' button on the bottom left of this thread.. We try to get as many users as we can to use it . EDIT: That guy doesn't know much about programming, Not sure why he babbles on like that. He's pretty good with some things though..