Jump to content

Caesar

Members
  • Posts

    1,025
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Caesar's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <?php if (preg_match('/MSIE/i',$_SERVER['HTTP_USER_AGENT'])) $h4 = '<h4>You use IE? LOL U SUCK!</h4>'; else $h4 = '<h4>Good for you</h4>'; echo $h4; ?>
  2. Why not keep ANY data from submitting, unless the user inputs a valid date? Maybe I just need to know a little bit more about what you're trying to do....
  3. That isn't the complete line in 111 right?
  4. You really don't want to do it in 100 different PHP pages. Instead, use methods (See OOP) or functions...all within a single PHP page. That being said, it's possible to display anything you want on a conditional basis. What you're asking is basically the basics of if/else 101. Something like.... <?php function loadpage($var) { // Your code here } if($_SESSION['loggedin']) loadpage('members'); else loadpage('login'); ?> There's of course different approaches, techniques...etc. But yes, more than possible.
  5. Can you show us the code where you're setting the session variable in question? Thanks.
  6. The sessions should not be destroyed, unless the browser is being closed, or you probably can't print out the values if you're not initiating the session again in the script/page they are coming back to. If you aren't, then the session variables won't be recognized. session_start()
  7. You can't do it all on the same page. Not using that approach, no. Why not just create a downloadable zip/archive of the files they want and have it as a single download?
  8. Javascript is your friend.
  9. You can always do something like... <?php $img_name = md5(time()).$extension; ?> Not very likely you'll have duplicates unless, the time/date on the server is changed. Edit: I assume you're going to store/log the fact they uploaded an image in your db. So yeah, you store the image name and in the same table, the user id associated with it.
  10. http://subversion.tigris.org/ Word to ya mutha, yo.
  11. So it becomes an issue when your number is negative or less than zero? If I understood you right, try this... <?php //Do this check before your other conditional statements... if($number < 0) $number = 0; if($variable > $number) { //Do the dew man. } ?>
  12. Try using 1-9 (1 through 9) when setting the image quality. It's been a while since I had to use image functions but if I remember, this is different when using ImageCopyResampled() (Which let's you set quality by %).
  13. User accounts with a messages table linked to their id, stored in a MYSQL database would be one approach.
  14. Does your host support dynamic loading? If so, Source Guardian provides the files on their site.
×
×
  • 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.