Jump to content

Azu

Members
  • Posts

    1,047
  • Joined

  • Last visited

    Never

Everything posted by Azu

  1. Hmm.. that's how I tried to have it before.. but it gave me an error saying I could only have 1 field in that format.. but I need to have two.. They both start out the same, but one of them gets updated once in a while, and sometimes it will need to be set to the other one. :-\
  2. What kind of field does it need to be then?
  3. Thanks.. I tried that and it didn't give an error.. it still isn't ordering it right though =S Here is the exact format of my sql table[code]create table `Topics` ( `id` mediumint(8) unsigned not null auto_increment, `parent` mediumint(8) unsigned default null, `topic` varchar(255) default null, `detail` longtext, `name` varchar(65) default null, `datetime` varchar(25) default null, `origtime` varchar(25) default null, `subs` int(10) unsigned default '0', `reply` int(10) unsigned default '0', `locked` tinyint(2) unsigned default null, `pin` tinyint(2) unsigned default null, primary key  (`id`) )engine=MyISAM  default charset=latin1 auto_increment=112 ;[/code]And this is the exact format the date is put in as[code]date("y-n-j G:i:s")[/code] I'm not sure if there is any other info that could be effecting this.. Oh and this is hosted on a linux server I think. I'm not sure what version though.. it's the one at bluehost.com Why am I running into so many problems trying to do something as simple as ordering by date? Is there some fundamental flaw in my coding (il)logic that I should change?  :-\ Oh and here is an example of what the datetime looks like in the sql table.. "07-10-20 23:59:59"
  4. [quote author=hvle link=topic=121217.msg498110#msg498110 date=1168086740] This is strange. max 32 bits int: 4294967296 max/2 = 2147483648 echo date('j-m-Y', 4294967295); // got error echo date('j-m-Y', 2147483645);  // 19-01-2038 for any negative $n: echo date('j-m-Y', $n); // got error echo date('j-m-Y', -680646);  // error It look as the unix time went from 0 to 2147483647 which is only half of the range of 32 bits int, with Windows. I don't understand this.  Perhap anyone can explain? [/quote] Maybe it's because it is a signed int? But then why are negative numbers giving an error..?  :-\
  5. Thanks, it works :) Now I just gotta find a way to change the white input fields to black..
  6. How can I make it so a page refreshes once every certain amount of seconds, but it simply updates the page rather then destroying, so if someone has typed something in a form for example, it won't erase it, and it won't un-highlight things people have selected, and won't scroll up to the top of the page, etc. Unless that part of the page is removed of course. Without javascript/activex etc. I've been trying to figure this out for a long time. The only ways I have come up with will only work with javascript or activex or something like that enabled, which a lot of people don't. I'd REALLY appreciate it if somebody could offer some ideas on this. Please?  :)
  7. Thanks, that helped a lot!  ;D It's still not quite what I had in mind though.. It makes it look like this:[img]http://img225.imageshack.us/img225/1310/afn6.jpg[/img] What I am trying to achieve is this:[img]http://img213.imageshack.us/img213/4021/2gz8.jpg[/img] Any more help would be really appreciated.. Oh and the pictures are a bit distorted from the jpg compression but they should give you an idea :) I wish I could figure out why the font color tag isn't working for me in Firefox..  :(
  8. [code]<?php echo"<font color=blue>Why isn't this text blue in Firefox?</font>";?>[/code] It doesn't show up blue in [i]Firefox[/i] can someone please tell me how to fix this? Setting colors in CSS works but the above code doesn't  :( And also how can I change the color of form buttons(such as the "Save" button when editing a post on this forum)? I can't even get the CSS to work for that.. Here is the CSS that I am using right now [code]<!--ul ul{display:none}ul li{list-style-type:none;position:relative}ul li:hover ul, li.over ul{display:block;position:relative;left:-18%}li.sub>a{font-weight:bold;color:#00CCCC}#nav{position:absolute;top:0px;left:-3em;font-family:Arial,sa<leftmargin="0"topmargin="0"marginwidth="0"marginheight="0">ns-serif}--><tablewidth="0"border="0"align="center"cellpadding="0"cellspacing="0">html{overflow-x:hidden;overflow-y:auto}BODY{text-align:center;font-family:Verdana,Tahoma,Arial,sans-serif;font-size:11px;color:#00CCCC;margin:0px11px0px11px;background-color:#000000}TABLE,TR,TD{font-family:Verdana,Tahoma,Arial,sans-serif;font-size:11px;color:#00CCCC}a:link,a:visited,a:active{text-decoration:none;color:#66FFFF}a:hover{color:#66FFFF;text-decoration:underline}[/code]
  9. How can I get the get? I know that I can use $_GET[somethingspecific] to retrieve the value of somethingspecific, but what I am trying to do is just retrieve whatever is after the ? So if someone types in http://www.website.com/?asdf then the asdf would be retrieved. Whatever is it would be retrieved and put into a variable. Please can someone tell me how to do this?
  10. Thanks. I'm using * because I need to use all of the data from that table. [code]$result=mysql_query("SELECT UNIX_TIMESTAMP(datetime) as timestamp,* FROM Topics WHERE parent=0 ORDER BY Pinned DESC, timestamp DESC",$forumdb);[/code]and[code]$result=mysql_query("SELECT *,UNIX_TIMESTAMP(datetime) as timestamp FROM Topics WHERE parent=0 ORDER BY Pinned DESC, timestamp DESC",$forumdb);[/code]both give an error;[quote]Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource[/quote] :( so in other words the query is failing for some reason..
  11. Maybe use something like[code]$chars[0] = "a"; $chars[1] = "b"; $chars[2] = "A"; $chars[3] = "B"; $chars[4] = "!"; $chars[5] = "@"; $chars[6] = chr(192); $chars[7] = chr(215);[/code]instead?
  12. CSS(Cascading Style Sheets) can be a very useful/lightweight alternative to images..
  13. That gives me the error "Fatal error: Call to undefined function: unix_timestamp()"  :( Here is the exact code I am using.. [code]$result=mysql_query("SELECT * FROM Topics WHERE Parent=0 ORDER BY Pinned DESC, ".unix_timestamp(datetime)."",$forumdb);[/code]
  14. You know how when you include an external CSS or JS file the client won't have to keep redownloading the exact same file over and over every single time he reloads the page? Can you please tell me how to do that with PHP/html? Like I have a file called foo.php and it's contents are <?php die("test");?> and I have <?php include"foo.php";?> on one of my pages. How can I make it so that it will work like using <style type='text/css'>@import'foo.css';</style> so that it won't have to keep downloading it over and over?
  15. I have a column in MySQL called datetime in this format[code]1999-1-20 23:50:50[/code] When I try using[code]order by datetime[/code]it has an effect.. but it doesn't work right. It should order it by years/months/days/hours/minutes/seconds but it doesn't. And[code]order by ".strtotime(datetime)."[/code]has no effect whatsoever. Can somebody please tell me how I should do this so that it will properly order?
  16. Azu

    search php

    [url=http://www.google.com/search?hl=en&q=Free+web+hosting&btnG=Google+Search]Here you go :) [/url]
  17. Make the php files on your computer and upload them to your server via [url=https://addons.mozilla.org/firefox/684/]FireFTP[/url] on Firefox. NEVER use something as unholy as ie when you are doing work for a church!
  18. Thanks  ;D And I didn't have anything specific in mind. I just want to replace a bunch of my GET links with POST links so stuff like google web accelerator is less likely to click on them all, and so when people press f5 over and over it won't reload the page over and over..
  19. I'm pretty sure that can only be done with php or some kind of frames..
  20. $post=preg_replace("/(\r\n|\n|\r)/", "<br>",$post) Why doesn't this work? $post=preg_replace("!\s+!","<br>",$post); Or this? $post=nl2br($post); Or this? None of them are taking out the newlines from $post :( $post is $_POST from a text field on a forum I'm making What do I have to do to replace the "newlines" or "enters" or whatever they are called, with <br> ? Please help  :-\
  21. [quote author=Mythic Fr0st link=topic=116939.msg476744#msg476744 date=1164947815] I am wanting to learn PHP ( For making an online game I want ) Sadly, I dunno how to GET it working... I've downloaded php, but I dunno what i use? is there an editor for it? do you view it in your browser, use notepad? i've got no idea O_O Can anyone help me with this, kinda a big set back lol [/quote] I think notepad is pretty good for it. To use php, just put "<? php //stuff ?>" in your file.. and make sure it's name ends in .php.. all of the php stuff is done in the server. It will send normal html to the browser. Try putting echo"something"; in it for a start :P Here is a [url=http://php.about.com/od/phpfunctions/PHP_Functions.htm]list[/url] of some PHP commands with descriptions of what they do :) And people viewing your website won't be able to see the actuall php stuff on your page, they will just see the html that is sent to them.
  22. Thanks for the quick reply. All of them will be internal. They just need to pass some data to the page it's running from, or to ./index.php Is there a way to do it without javascript? I've been trying very hard to get my site working without javascript/flash/activex etc being needed..  :)
×
×
  • 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.