Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. I just got that syntax from the javascript docs! I know you can define arrays that way as I just tried it on some js code and it worked. This is a javascript problem and belongs in that forum.
  2. far-blue, why are you using session_write_close? Is it really needed for the script? If you're having trouble with constantly trying to write to the session after you've called write_close, maybe you need to restructure something, so you don't run into this problem, or don't use write_close?
  3. You can't output anything to the screen. If you want to be able to reload the page, you should do all your processing before you ever output anything, any HTML, anything.
  4. Did you read what I posted? I showed you how to get the key of the PHP array. If you're asking how to put it in your JS array, that's a Javascript question. Maybe instead of using .push, just assign them, if you want the keys to be the same. foreach($array AS $k=>$v){   print 'MyArray['.$k.'] = '.$v; }
  5. Then you must be outputting something to the page before then. What is on line 106? Read the topic on header errors too.
  6. you can send it back in an array $ret['target'] = $target; $ret['actual'] = $actual; return $ret
  7. foreach($array AS $k=>$v){   //print js in here - i don't know the js syntax for array, post what you have. }
  8. Don't echo anything out, and use header('Location: phppage.php');
  9. $sql = "SELECT `c_id`, `name`, `p_id` from `navtest` WHERE `p_id` = 0"; $result = mysql_query($query) or die(mysql_error()); you're using two variables, $sql and $query. Pick one ;)
  10. Why doesn't it work? Do you get an error?
  11. Ajax - check out the mootools.net framework.
  12. No, that's the point of a proxy. Some will modify browser info, but that's also unreliable. No. PS: through, their, proxies, their, etc.
  13. SELECT * FROM table WHERE yourDate > '$begin' AND yourDate < '$end' Where $begin and $end are formatted the same way. AFAIK this will work.
  14. Sorry, I missed the line where you said you didn't know how to use them. http://www.php.net/manual/en/language.references.php
  15. I think you need to look into passing variables by reference.
  16. "Do you think its possiblem being on a shared host, that if someone else is using the usrid session varible on their site that they could go directly to my site and still have the same registered session variables?" No, sessions are linked to the domain.
  17. See this topic: http://www.phpfreaks.com/forums/index.php/topic,123562.0.html
  18. $settingsSpeed = $serverObject->GetSettings("speed", $current, $default, $min, $max); echo($min); What does this code do? Do you know what GetSettings does? Are those even valid arguments? I thought you said you were converting it - if you're writing it, can't you change what GetSettings does? PHP passes by value - try passing those by reference? &$min Otherwise $min is not affected by the function, because the $min in the function is a copy of $min. (confused yet?)
  19. [s]If you're asking how to define the default for an argument, it's function foo($bar="x"){ } If not, please rephrase the question, I don't get it.[/s] Okay I think I get it now, but I don't know how to do what you want without seeing more of your code. What is the serverobject class? Is speed a var of it? In your getsettings function, you'd have to handle getting the attributes.
  20. $input = file_get_contents( $filename = 'index.php'); $filename='index.php' evaluates to true. So you're doing $input = file_get_contents(TRUE); Change it to: $input = file_get_contents('index.php'); or define $filename before the function call.
  21. When you retrieve it, save the id. $array[$id] = $value; Then print the $id in the link to delete.
  22. does the row have a unique ID? Use that.
  23. Thanks guys. Deltran - Thanks, I will talk to him about sprinkling some photos in. I don't like the photos because they're so poor quality, and he's taking more soon, so we'll have to put them all over the site :) Andy - good idea on the image - I'd have to code that to generate the background image each time, because of the border and tilt, so I'd like to avoid something that would take too long. Your other suggestions I will do.
×
×
  • 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.