Jump to content

Darklink

Members
  • Posts

    126
  • Joined

  • Last visited

    Never

Everything posted by Darklink

  1. $timenow = time() + 1209600; mysql_query("UPDATE tblRow SET date_created='FROM_UNIXTIME({$timenow})' WHERE id=1"); FROM_UNIXTIME() simply converts a timestamp into it's date. And yes... 2 weeks is 1,209,600 seconds.
  2. Wherever you want code, just add PHP into your HTML with the opening and closing tags of course. It's quicker and more flexible than using any template system. The only downfall is clutter in your HTML, but you can sort this out by understanding PHP syntax a little more to neaten it up a bit.
  3. Test if the two passwords are the same when you do the validation rather than at the beginning. <?php echo "{$password}<br/>{$password2}"; if ($password != $passsword2) { $errorMessage .= "<br />You have not entered the same password twice. Please try again."; }//end of if ($password != $passsword2) ?> You may be changing one of the variables before the validation but after the debugging test you've placed yourself. Also, just to let you know, if you want to check that something is not equal to something else you do it like this: <?php // Add single quotations to your array and use != rather than !$x == 'xxx' if( $query['usergroup'] != "Super Administrator" ) // Not if( !$query[usergroup] == "Super Administrator" ) ?>
  4. I use ODBC functions because I need to access various databases and so I made myself an ODBC framework to save a lot of hassle in that area. I am using this specific query on a MySQL database however and I cannot work out why this is happening.
  5. I'm trying to build a query with fulltext using the ODBC functions. I executed the query in phpMyAdmin and made a quick side-script to test the query and they both worked absolutely fine, however when I use the query in a larger script it seems to fall and returns me an error message saying it can't find an error message: I cannot find this error message anywhere online. Why on god's earth is this happening when practically the same code is working on a different file. Here is the code. You could try it out for yourself, but it will work for you. It returns 2 rows successfully, but cannot put them into an array for me. When I take away the * from the fields to select it works but doesn't return the fields I want it to. Only the relevance. I just need someone to explain to me why I could be receiving such error! Thanks
  6. Absolutely brilliant. Don't know why I didn't think of doing that. Thanks
  7. Okay, so I am having this problem with an image border. I am making a shadow effect for the divs I am making and it's successful only until I want to be able to expand the div according the content within a child div. Basically as it goes: Parent div is simply a container for all the divs that make up the content, header and borders (it's not that complicated! Trust me on that). The parent div does not have a set height nor does the content div because the content may be larger or smaller than the height specified so I want it expandable. Floating to the right is the right border which is the only part that doesn't expand and if if I set the height to a 100% it simply disappears, which isn't really any use. So what do I do? CSS: .tclass { background: url(images/background/tborder_top.jpg) repeat-x; top; min-height: 100px; overflow: hidden; } .tclass .head { background: url(images/background/thead.jpg) repeat-x top; padding: 10px 20px 5px; height: 19px; color: #6a6a6a; text-align: right; font-weight: bold; } .tclass .content { background: url(images/background/tcontent.jpg) repeat-x top; height: 100%; color: #3d3d3d; overflow: hidden; padding: 15px 0px 15px 15px; } .tclass .tb-right { width: 8px; height: 100%; float: right; background: url(images/background/tborder_right.jpg) repeat-y right; } HTML: <div class="tclass" style="clear:both;"> <div class="tb-right"><div class="tb-topright"></div></div> <div class="head">Title here</div> <div class="content">Content here</div> <div class="tb-bottom"><div class="tb-bottomleft"></div><div class="tb-bottomright"></div></div> </div> Hope someone can give some suggestions. I'm expecting to hear, "you can't do this" as I know CSS can be an ass with these things.
  8. You would have to make a definition in A like so: a.php: ----------------- <?php define('SCRIPT_A_LOADED', true); ?> c.php: ----------------- <?php if ( SCRIPT_A_LOADED ) { echo "gotcha!"; } ?>
  9. I am using Windows Server 2003.
  10. You mean, "what does :: do/mean?"? It's the same as -> I believe.
  11. Woops. SMF didn't post my break tag. <br /> That's the one.
  12. I'm trying to test setting the permissions in Windows but the only group that won't apply is the CREATOR OWNER group. Which seems like it could be causing the problem. Seems strange as the settings were applied in the past but must of reset for some reason. Do you know why it won't apply the settings?
  13. Hmm. I'm really unsure with how PHP acts with Mac so I'm probably not the person to help you here. Google Analytics won't have anything to do with it though.
  14. \n produces a new line in the HTML code (\r\n for windows) <br/> will produce an actual line in the output.
  15. They say with HTML, that if you include a CSS file it's slower than putting all the CSS in the HTML and the more CSS files you load, the slower the output is. I know it's not PHP, but I reckon it might be similar although if that's the case, it's an incredibly tiny and unnoticeable change.
  16. Do you mean changing the rights of the user for the directory above all new directories? Because I've already tried that.
  17. Unfortunately I'm using IIS. Don't ask why. I wanted to use Apache but the company decided IIS on Windows Server 2003 is the best solution. *rolls eyes*
  18. Have you got some SEO software installed or something? It's probably taking in /gibberish as a URL parameter. Or because it wasn't coded to handle SEO, it's screwing up all the image paths and href links.
  19. But the whole point of this thread is to find out if I can do this automatically rather than manually. :-\
  20. All I'm doing is creating directories and then setting the permissions equivalent to 0777 to those new directories. So users can upload images to their directories. It would just save time if staff members didn't have to set the permissions of every folder manually.
  21. So there is no possible way with PHP to be able to do it?
  22. Actually, let me correct myself. Windows does do CHMOD, but it works differently to Linux and Mac. But to make it clear, both chmod and ftp_chmod do not work with Windows as far as I have seen.
  23. I'm not talking about the chmod() function. I'm talking about CHMOD in general. FTP Protocols will still not work CHMOD for Windows. Windows has a different way of working with permissions. Therefore ftp_chmod() will not work either. There has to be a command line to be able to change the permissions. But I'm not able to find a solution to this.
  24. No. As I've said, CHMOD is not supported by Windows (although I have been aware that in some cases people have gotten some things to work with CHMOD but it's incredibly unstable).
  25. I would like to do this automatically. Most FTP software do not support the changing of permissions on Windows. You have to actually remotely access the server and change the attributes from there on in, which is a pain. I need to know of a command that I could use with an ftp command function such as ftp_site() which allows me to do this.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.