Jump to content

BlueSkyIS

Members
  • Posts

    4,268
  • Joined

  • Last visited

Everything posted by BlueSkyIS

  1. http://us3.php.net/manual/en/ref.session.php long story short: page 1: session_start(); $_SESSION['var1'] = "hello world"; page 2: session_start(); echo $_SESSION['var1'];
  2. bad code should be: for ($i=1;$i<=$maxPages; $i++){
  3. "I don't want to use hidden inputs, and I don't want to do it via the URL." Your only remaining alternative is sessions.
  4. If you can't use mail() on the free one, I can't imagine they'd let you use more complex methods to use mail() on an external server.
  5. How many seconds in a day? 86400. How many seconds in an hour? 3600: $final=round($delta/3600);
  6. No. Put this before that line and see yourself: $row['url'] = "test"; $row['url'] must be empty if you're not seeing anything there.
  7. it looks like you end the code without closing your if statements. try replacing the bottom part with this: if($errmsg == '') { if(get_magic_quotes_gpc()) { $subject = stripslashes($subject); } $to = "amolaee@jbn.com"; $subject = 'application from met website' . $subject ; } mail($to, $subject, $body); header('Location: nextstep.php'); exit; } else { echo "error: $errmsg"; } } // Don't forget to close the if (POST) from the top
  8. I don't see parent id in your original post. Where does it come from?
  9. what exactly is it not doing that it should be doing? what are the unexpected results you are seeing?
  10. close. mysql_query("SELECT * FROM tablename WHERE id='id' LIMIT 99,101"); .....except this will return the records in no particular order since you haven't defined and ORDER BY.
  11. it looks like you want to use a recursive function that calls itself. function recurseFunc($all_forum_replies) { foreach ($all_forum_replies as $key => $replies) { if (!$replies[4] || $replies[4] == $replies[0]) { listing($replies,'false'); recurseFunc($replies); } } } call it once: recurseFunc($forum_replies); .... or similar
  12. so is the problem with PHP or Javascript in your validator?
  13. "Is there any way I can send the "&" sign as URL? Escape it? Ascii code?" $a_string = urlencode($a_string);
  14. NO problem! Been there, done that. Please mark this topic solved by clicking the solved button.
  15. "00:00:00 is the default setting if no time is set. Whats the deal?" The field is set to NOT NULL, so it must put something in there. If you rather have nothing than 00:00:00, allow the field to be NULL.
  16. ^^ "but the client wants it so it is only changed for that script, not site wide." at the top of your script, use ini_set('max_execution_time', $value_in_seconds);
  17. is $venue the only value not coming out? if so, make sure 1. you have the right spelling of the database field, and 2. there is data in that field.
  18. "The following code is where it seems to fail, but who knows, it could be somewhere else in the code." Dude! That's not very specific at all. Have you tried putting in echo statements to watch the values as the code runs?
  19. mysql_connect($server,$user,$password) or die("not connected.");
  20. Don't use hard-coded height or width values or you will stretch your images. To resize to within a height/width range: 1. Determine the maximum height and width you want for an image. For instance, say ALL pictures should be no more than 110 pixels wide and no more than 90 pixels tall. 2. For each picture, determine whether it is portrait or landscape by comparing it's height to it's width. 3. A. For landscape images, find the ratio of the target WIDTH to the actual WIDTH. For instance, if the actual image is 160 pixels, the ratio is 100 pixels / 160 pixels, or 0.625. Multiply both the actual width and the actual height by 0.625 to get the new width and height, then use those values to resize the image. B. For portrait images, do the same thing, but compare the target HEIGHT to the actual HEIGHT and the change BOTH on the resize.
×
×
  • 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.