Jump to content

onenonly

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Everything posted by onenonly

  1. now it doesnt work for IE????? IE doesnt keep it atleast the height at 700 now its the other way around... I found the fix!!! =) i dunno why but it works min-height:700px; height:auto !important; height:700px;
  2. now it doesnt work for IE????? IE doesnt keep it atleast the height at 700 now its the other way around...
  3. Works fine on IE, but not FIREFOX... In my CSS I define HEIGHT to 700px for my TABLE If my TABLE has nothing in it, I still want the Height at 700px In IE Table height stays at 700px but if content inside is larger the table height also stretch Thats what I want FIREFOX to do... In FIREFOX Table height stays at 700px no matter what, even if the content inside is larger it still stays at the height I fixed it by taken out the height attribute so it stretch automatically to the content inside but if no content is added the table height will not be at 700px at default which will amke the page look empty anyone found a fix?????
  4. <table> while ($row = mysql_fetch_array($result)){ echo "<tr>"; echo "<td>$row['title']</td>"; echo "<td>$row['download']</td>"; echo "</tr>"; } </table> I have about 10 rows of data but I want to add some ads between them how do i break the loop just for my ads then continue the loop?
  5. <?php // Get Image Height & WIdth class imagedimension{ public $imagewidth; public $imageheight; // contructer function imagedimension(){ $this->imagewidth = '1000'; $this->imageheight = '2000'; } function getwidth(){ return $this->imagewidth; } function getheight(){ return $this->imageheight; } } $test = new imagedimension(); if($test->imagedimension()){ echo $test->getwidth(); echo $test->getheight(); }else{ echo 'bad'; } ?> shouldnt it be true???? usually its true but not in this situation???
  6. Thanks, thats the structure I planned, but Im still pretty new to the databases. How should I structure the DB? id views ip every time user visit the page get their ip by using $_SERVER['REMOTE_ADDR'] then add their ip to database plus add increment to their view if ($row['views'] > 3){ do this }else{ add ip and views to database }
  7. Im using a remote file which is 322kb total of five on 1 page i get the width and height from my remote image using getimagesize() then resize the image them
  8. getimagesize() function is too slow when loading . all i want is image height and width but it takes so long I have 5 image on my page, each is like 322 kb it lags for like 3 secs but thats way to long for just 5 image soon i will be adding thousands of image anyways of getting image width and height faster?
  9. nevermind i got it var box = document.getElementById('box'); box.style.marginLeft = -myImage.width/2; including css with absolute position left:50%;
  10. I tried using CSS left: 50%; margin-left: <half image width>; But i need margin left to be dynamic because I will be using different images the width of each image is different so i need to change margin left everytime I tried using javascript document.getElementById('box').style.marginleft = myImage.width/2; this doesnt work any idea on best way of achieving this?
  11. how do I change it permanently Im on a shared webhost
  12. do you do that once and its permanent? or you must put it on top of all your script?
  13. so i either use date_default_timezone_set() to set a certain time in my script right? also is it possible to permanently set it to my timezone?
  14. When i use date() why is it giving me wrong time? It is an hour ahead of what it suppose to be How can i fix this and why is it like that??? Btw i search why and some say u must config with your server provider
  15. it doesnt work??? <?php $time = "2009-06-17 13:51:01"; $test = strtotime($time + "2 hours"); echo $test."<BR>"; echo $time."<BR>"; echo date("Y-m-j H:i:s", $test); ?> output: 1245287460 2009-06-17 13:51:01 2009-06-17 20:11:00 <-----WRONG it suppose to be 2009-06-17 15:51:01
  16. I get datetime from mysql in this format 2009-06-17 13:51:01 when I get that from mysql I want to add 2 hours $row = mysql_fetch_array($result); echo $row[date]; echo $row[date] + 2 hours; ????
  17. All i want is when i insert something into the database I want it to be displayed 48 hours later what is the best way of doing this? $a = (current + 48 hours) $b = (current time) should insert the $a into the database and when $b < $a display it or should I insert the $bb into the database and display the code only if ($bb + 48 hours) > $b also should I parse date into mysql code or keep it php date so its eaier to handle?
  18. s When a string or a number is formatted with fields ordered left to right, MSD (Most Sugnificant digit) to LSD (Least Sugnificant Digit), which for a date would be YYYY-MM-DD (which is why database dates are formatted that way), they can be directly compared and sorted. You should always put the current date/time into the database (so you both know when it was inserted and in case you need to change exactly how far into the future/past it gets selected) and then form your query to select that data/time when you want it. so i should put the current time into the database then parse the code the date entered into the database plus 48 hours? if i have the database auto enter the number into the database with the current time how do I break up the datetime to parse it by 48 hours?
  19. how does php know of comparing dates not numbers with greater than or less than symbol? I really dont know how to code date with php and mysql. What the best way to input a record into the database but post it two days later? should i put in current time plus 48 hours later into the database but how do i increment the time by 48 hours?
  20. $query = "SELECT * FROM movie, game"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)){ echo "<table>"; echo "<tr><td>".$row["type"]."</td></tr>"; echo "<tr><td>".$row["name"]."</td></tr>"; echo "<tr><td>".$row["date"]."</td></tr>"; echo "<tr><td>".$row["picture"]."</td></tr>"; echo "<tr><td>".$row["description"]."</td></tr>"; echo "</table>"; echo "<BR><BR>"; } it doesnt work I want all records to show both table are not connected by any means
  21. thx andy dats what i been trying to find!!! thanks yall!!!!! BIG HELP THUMBS UP!!!
  22. so it doesnt query the data basically it mean if no error return then true
  23. $query = "SELECT name FROM ".$type." WHERE name='".$name."'"; $results = mysql_query($query); if ($results){ what does if ($results){ mean? does it mean if it find name='".$name."'"; it true? or does it mean if no error even if dont find anything true?
×
×
  • 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.