Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Post the code you used with preg_match. The regex should check for page x of x results.
  2. Now it doesn't display gah or your table? What about if(empty($profile['customt1'])){
  3. Can you post the content of the file you're trying to include? You'll need to use eval() on it, but since that's putting out an error, let's see the code.
  4. Instead of comparing it to 0, try checking if it is set. If I recall correctly, if($profile['customt1']==0){ Will convert $profile['customt1'] to a number. Since it's not a number, it turns into 0. Thus, TRUE. Try if(!isset($profile['customt1'])){ // gah }
  5. You have several syntax problems. Try this. [code] if ($user == 1){   echo $user." is a customer number and cannot be used<p>"; }else if($user == 0){   echo $user."  is not a customer number in use<p>"; }[/code]
  6. Oh wait, no it shouldn't...I confused myself. Mmmm... Can you try putting it in a loop and running it for all the possible offsets? Let's see where it's messing up?
  7. Have the page get the number out of the session. If there is no number, start with 1. So show one. Store the number 1 in the session. When they click the continure button, show the page again. 1 is in the session, so go on to 2. Continue until done.
  8. Under that, do print_r($profile); and see what it says for customt1. Paste the print_r() result here?
  9. If they're behind, are you using a - number? If so, won't that result in you trying to use date() on a negative number? I think that won't work. Correct me if I'm wrong.
  10. Then you'll need to use the correct host...Or were you just trying to hide your host info?
  11. Post the code where you get $profile
  12. Is the server actually localhost?
  13. My way was enterprisey :) You know they just changed DST in the US? It's going to start on a different date than it used to.
  14. [quote author=mjlogan link=topic=123847.msg512433#msg512433 date=1169657458] [code=php:0]return date("l, jS F, Y", strtotime("last sunday", time()));[/code] [/quote] I feel like such a doofus. That is a much easier, faster way to do it. Kudos ;)
  15. You might look into a simple CMS - wordpress would be an easy to use one.
  16. [code]<?php //Get today $dayInWeek = date("N"); $theDay = time(); //Subtract days until it's the 7th day, Sunday while($dayInWeek != 7){     $theDay = $theDay-(24*60*60);     $dayInWeek = date("N"); } //The last Sunday was $theDay; print date("m-d-Y", $theDay); ?>[/code]
  17. SELECT col1, col2, col3 FROM tbl WHERE test LIKE '%|48962|%'
  18. The third parameter of substr is not end, but length. So you're saying $p_Tempdescription = substr($p_description,$start,$end); $p_Tempdescription = substr($p_description,0,5000); $p_Tempdescription = substr($p_description,5000,10000); <- sub string will be 10,000 chars, not 5000. Keep your third param 5000 each time.
  19. IMO: Session is the best way in this case. You can also pass the form values back in the session to repopulate the form with the OK data.
  20. You need to surround strings with '' "SELECT col1, col2, col3 FROM tbl WHERE test LIKE '|48962|'" "didn't work" is very vague. Be more specific.
  21. That site is written in asp, but you could create something in PHP. How you could do it depends on what exactly you're trying to do. If you just want to display text on your page, that's just HTML. If you want it to automatically update somehow, that's harder.
  22. Fix the error in the code you posted and it will work. <?php foreach ($TopLeftArray as $key => $value){ print "TopLeft[".$key."] = $value"; } ?>
  23. If you want to use the meta refresh tag, that will work for most people.
×
×
  • 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.