Jump to content

Dobakat

Members
  • Posts

    54
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Dobakat's Achievements

Member

Member (2/5)

0

Reputation

  1. Dobakat

    NOOB ERROR

    I have a page I made which uses CSS and all.. but there seems to be some sort of thing that is not allowing scroll bars to appear when I make my window smaller... I never seen this before and don't know what to do to fix it.. can some one please help me...
  2. I got my own private messaging system up and running for my website, but one thing I want to do is enable the users to send a mail to many recievers. Right now if they want to send the same message to 2 other users, they have to send it twice. I want to allows users to type "dobakat, deneb, poncho, pablo" in the textfield and have the message sent to all those users.  Some ways I could think of is to use an array, then get the size and do a for loop, or while loop. The thing I am having problem is how to manipulate the string so that instead of having a big string "dobakat, deneb, poncho, pablo" to have strings, "dobakat" "deneb" "poncho" (potentially stored in an array) and so on. I tried looking for a tutorial to do this, but I fail to find it. Well, I appreciate the time you took to glance at my post, and thanks in advance.
  3. I read the first tutorial, I learned things, but didn't find an answer. I talked to other people and they all recomemended the <img src='images/ice.jpg'>, but I fail to use it properly. How can I use it? $src_image="<img src='images/ice.jpg'>"; im my function? or <img src="images/ice.jpg" /> in my header? or echo"<meta http-equiv='pics-label'; URL=images/ice.jpg>"; instead of the Header('blah blah'); Thanks in advanced.
  4. I always had a problem with headers, and this is no exception. My function: [code] function getMaps($x,$y ){ //Get srcx and srcy $src_x=$x-5; $src_y=$y-5; $src_image="images/ice.jpg"; header('Content-type: image/jpeg'); $dst_image= imagecreatetruecolor(200,200); $dst_x=0; $dst_y=0; $dst_h=200; $dst_w=200; $src_w=10; $src_h=10; $image = imagecreatefromjpeg($src_image); imagecopyresampled ($dst_image, $image, $dst_x, $dst_y,$src_x,$src_y,$dst_w, $dst_h, $src_w, $src_h ); imagejpeg($dst_image, null, 100); }[/code] Works fine a page on its own, but when I added it to my function.php page and then tried to call t from another page I get this header message: Warning: Cannot modify header information - headers already sent by (output started at .../city.php:11) in .../functions.php on line 106 As you can see my problem here is this line of the function: [code] header('Content-type: image/jpeg'); [/code] My header is: [code]<head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <script type="text/javascript" src="main_functions.js"></script> </head>[/code] I tried changing my header to [code]<head> <meta http-equiv="Content-Type" content="image/jpeg; charset=ISO-8859-1" /> <script type="text/javascript" src="main_functions.js"></script> </head>[/code] but it does not work. Like I said, I am not good at  headers, can someone help me!?
  5. <BUMP> can somone help me with my header issue? thanks in advance.
  6. I changed something and got a list of all the numbers you were echoing. I am not sure if this is what you waned. [code]<?php $primes=array(); $cur=2; $count=0; $number=6; while(1) { if($cur%2==0 && $cur%3==0 && $cur%4==0 && $cur%5==0 && $cur%6==0 && $cur%7==0 && $cur%8==0 && $cur%9==0) { $primes[$count]=$cur; echo "{$primes[$count]}<br>"; $count++; for($num=0;$num<count($primes);$num++) { $temp=$number/$cur; if(in_array($temp,$primes)) { echo "{$temp} and {$primes[$count]}"; die(); } } }                 $cur++; } ?> [/code] The loop is infinite, so after 30 seconds it stops.
  7. I always had a problem with headers, and this is no exception. My function: [code] function getMaps($x,$y ){ //Get srcx and srcy $src_x=$x-5; $src_y=$y-5; $src_image="images/ice.jpg"; header('Content-type: image/jpeg'); $dst_image= imagecreatetruecolor(200,200); $dst_x=0; $dst_y=0; $dst_h=200; $dst_w=200; $src_w=10; $src_h=10; $image = imagecreatefromjpeg($src_image); imagecopyresampled ($dst_image, $image, $dst_x, $dst_y,$src_x,$src_y,$dst_w, $dst_h, $src_w, $src_h ); imagejpeg($dst_image, null, 100); }[/code] Works fine a page on its own, but when I added it to my function.php page and then tried to call t from another page I get this header message: Warning: Cannot modify header information - headers already sent by (output started at .../city.php:11) in .../functions.php on line 106 As you can see my problem here is this line of the function: [code] header('Content-type: image/jpeg'); [/code] My header is: [code]<head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <script type="text/javascript" src="main_functions.js"></script> </head>[/code] I tried changing my header to [code]<head> <meta http-equiv="Content-Type" content="image/jpeg; charset=ISO-8859-1" /> <script type="text/javascript" src="main_functions.js"></script> </head>[/code] but it does not work. Like I said, I am not good at  headers, can someone help me!?
  8. I figured it out, thanks. That functio does work for what I wanted.
  9. I have been trying to figure out the imagecopyresampled() functions and I have only found examples that rize the image, not that buts an specific part of the mage and then display it.. anyone has an example I can see?
  10. For starters, I would like to clarify that I understand what I want might no be possible and that I would not get dissapointed. Secondly, I understand it might be very hard, but I am willing to try it. Here is the scoop: I have my website in which I want to display an image that is roughly around 1000x1000 pixels. This picture is the 'map'. Each members on my site have a position, lets say 500,500. I want to display the same image, in the 100x100 pixel box. The only parts I would like to show are from 450,450 to 550,550. This being x,y of pixels.  I know how to make it get the users position, but not how to only show a 10000pixel square(the 100x100 box) with the user's position as center, without any shrinkings. I don't if this is possible with palne html and php code. I understand that it might use another coding language, if it does, let me know which one it is.
  11. I have a code that works perfectly and in the handleResponse() I got this code: [code] if(response) {                 // UPDATE ajaxTest content                 document.getElementById("monsterAttack").innerHTML = response; setTimeout(monsterAttack,2000);             } [/code] But I want it to stop if it meets certain condition, like x<=0?
  12. I am building my own game from scratch... maybe we could join. I am trying to do it with some AJAX. :)
  13. I am not sure if this shall work for what you are trying..but test it.. [code] <? $num = strip_tags($_GET['num']); echo $num; $num=$num+1; print "<META HTTP-EQUIV=Refresh CONTENT=\"10;url=yourpage.php?num=$num\">"; ?> [/code]
  14. Well I got a website, and I got a function that helps me add the news to the MySql database. On the main page I use PHP to get the 2 newest news. And I put echo"$fetch->news"; Well the $fetch->news does not matter, its just the assigned variable that has the news. The problem is that some news are too long. I only want the first # words to appear, then skip a line and put a link that says 'Read more...' with a link to the article. I am not worrying about the linking, only on how to making it put only 4-5 line of the begining of the news. If I was confunsing in some way, let me know. I hope someone can answer my question.
×
×
  • 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.