Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Your post is a little confusing, but if you have an array with 4 variables and you want one of the other three, copy the array, remove the one you know, and use shuffle or any other random function.
  2. What do you get when you DO echo it? or better yet, use var_dump?
  3. Probably the last line where you have a comma and nothing after it.q
  4. Right now I love jEdit. (I'm on my phone so no fancy linking for me.) I also use Git and Putty every day, and WinSCP when I need it. And one of the first things I put on any computer I work on is a Proggy font. My favorite monospaced font designed for programmers.
  5. Are you saying that everyone there uses vi or that's the only allowed way? I would say about 95% of my coworkers use vi. I prefer windows and use various text editors. No one cares as long as the work gets done. And yes we all do the work on the remote server (so my text editor has to use sftp), why bother doing it locally when I can do it on the dev site and test it right away? We use svn git and cvs, depends on the project. We are slowly moving to all git.
  6. So, what I changed was instead of just subtracting half of the cropped amount from the height (or width), I subtracted the entire thing. If your image was 100 px tall and you needed to crop 10 off each side (so final image is 80 pixels tall), your code was doing 10 off the top as the starting point, and then (100-10) = 90 tall. That's an image which is still 90 pixels tall. You needed to take off the entire cropping amount from the height, and the half amount from the starting point.
  7. It worked, didn't it? The logic is right there in the code I posted. I only added two lines and changed one. Also, our names are above our titles. I am Jessica and the other person you replied to is Barand.
  8. I copied your script, and using a static image (http://img.gawkerassets.com/img/18ip3heqdjqlwjpg/xlarge.jpg) I made this small change to your script: $src_w = $image_width-($src_x*2); $src_h = $image_height-($src_y*2); imagecopyresampled ($dst_image , $src_image, 0, 0, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h); And got this cropped image. Is that what you were looking for?
  9. I misread. If you have $new_width, $new_height they should be set to your new width and height. Post your entire code.
  10. You could run the script to get the data in the background and save it to your own database, then select the data out of that when you need it. As long as you're allowed to be doing what you're doing.
  11. How is it a "hack"? You have a year as a string. You want to print that year plus "0101". Literally that is as simple as concatenating your two strings. It's like if you said you had a last name and wanted to display the first name as "joe" for every last name. echo "Joe ".$lastname; If you want it in a format other than a STRING then you'll want to use fancier functions, but so far your post only indicated adding the string of "0101".
  12. instead of 0, 0, start at 50, 50...
  13. Also, there is a big difference between an employee playing games all day, and visiting Facebook twice a day or at lunch. People can be more productive when they get to relax every now and then.
  14. Yeah, you need to get your money back, or get your hands on that awesome time machine the designer used to come to 2013. Comic Sans? No. Glowing Shadowed Text? No. The entire design is amateur. Google "CSS Design" and compare your site to ones on those sites. (On some design compilation sites you can sort by purpose or style) Also, why do you have a link to a forum in your header? That doesn't even work... I stopped looking at that point. Design takes years to learn to do well. People can typically be good developers, or good designers. Or crap to middling at both. Programming and Graphic Design simply use different parts of the brain. Find people who are good at design and hook up with them.
  15. Just like the dozen other times we've told you, you need to normalize your data. We will not help you do it the wrong way. Stop asking.
  16. Switch the keys and values and use ksort, or just use array_keys
  17. A. There's a function called array_keys B. just change the code to put the value in the value instead of the key.
  18. You can use like without them, can't you?
  19. if ($data = "") { = is assignment. == is comparison. You're also missing a call to mysql_fetch_assoc or similar.
  20. So why does the site you're linking to say its ColdFusion, not to mention your other post about it? Do you know the difference between PHP and cold fusion?
  21. $a = $_POST['a1']; if($a1 == ''){ echo $a1; } This is what you did. What do you think will happen every time?Hint: You'll get a PHP notice if you have error reporting set to -1.
  22. Based on his other posts he means a ColdFusion CMS. Which has absolutely nothing to do with PHP applications.
  23. Look at the lines I posted. They don't make any sense. $fullname = $_POST['firstname']? $secondname = $_POST['lastname']? Then later you use firstname and lastname, which are both undefined.
×
×
  • 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.