Jump to content

ikmyer

Members
  • Posts

    109
  • Joined

  • Last visited

    Never

Everything posted by ikmyer

  1. mind if i ask where your pulling the data from ?
  2. yeah, biggest custom app i have made has about 70,000 records in one table... no sweat.
  3. I have been asked to create a site that will host a college basketball tournament pool ( march madness ). I have done a college football pool picks but that is a little easier as there is just x number of 1 on 1 games... I'm looking for suggestions on how to structure the database, to allow for a total of 64 games and when the user picks the first round... their picks go to second round and so on... I won't have a problem coding it, just need some ideas on how to structure the data in the most logical / efficient way... can't wrap my head around it. Thanks in advance for any suggestions.
  4. Hello, I have recently been working on 2 different servers... one Fedora and one Ubuntu On the Fedora server you have to included the .php on the endings of all the files. ( hxxp://www.mysite.com/test.php ) On the Ubuntu server you do NOT have to include the .php on the end so hxxp://www.mysite.com/test would load the same page as test.php. Anyone know how I can set this up on the Fedora server ? Thanks
  5. before doing the insert do a query on the database to see if the email is already in use... then based on the results from the query (if a record is found, mysql_num_rows()), do the insert.
  6. try... $select = "SELECT COUNT(session_id) FROM carttemp WHERE session_id = $id";
  7. sorry, you'll want something like this... you'll have to base the menu of the current file name or something... which $_SERVER['SCRIPT_FILENAME'] will tell you... <?php $current_page = basename($_SERVER['SCRIPT_FILENAME']); if ($current_page == 'media.php') { echo '<div class="menu"> <ul> <li> <a href="/media/">media</a> </li> <li> <a href="/media2/">media 2</a> </li> <li> <a href="/media3/">media 3</a> </li> </ul> </div>'; } else if ($current_page == 'about.php') { echo '<div class="menu"> <ul> <li> <a href="/about/">about</a> </li> <li> <a href="/about2/">about 2</a> </li> <li> <a href="/about3/">about 3</a> </li> </ul> </div>'; } else if ($current_page == 'extras.php') { echo '<div class="menu"> <ul> <li> <a href="/extras/">extras</a> </li> <li> <a href="/extras/">extras</a> </li> <li> <a href="/extras/">extras</a> </li> </ul> </div>'; } ?> ... should work.
  8. use the var: $_SERVER['SCRIPT_FILENAME'] http://us3.php.net/manual/en/reserved.variables.server.php
  9. just wondering... why are you looking for a different way?
  10. JD*'s code will always work... it changes both strings to all lower case then compares them
  11. sorry, actually look at some of my code this time... here is my full list... note this creates a range like 2008-06-01:2008-06-30 <?php $day = date("d"); $month = date("m"); $year = date("Y"); $today = date("Y-m-d").":".date("Y-m-d"); $yesterday = date("Y-m-d",mktime(0,0,0,$month,$day-1,$year)).":".date("Y-m-d",mktime(0,0,0,$month,$day-1,$year)); $week = date("Y-m-d",mktime(0,0,0,$month,$day-6,$year)).":".date("Y-m-d",mktime(0,0,0,$month,$day,$year)); $thismonth = date("Y-m-d",mktime(0,0,0,$month,1,$year)).":".date("Y-m-d",mktime(0,0,0,$month,$day,$year)); $lastmonth = date("Y-m-d",mktime(0,0,0,$month-1,1,$year)).":".date("Y-m-d",mktime(0,0,0,$month-1,date("t",mktime(0,0,0,$month-1,1,$year)),$year)); $thisyear = date("Y-m-d",mktime(0,0,0,1,1,$year)).":".date("Y-m-d",mktime(0,0,0,$month,$day,$year)); $lastyear = date("Y-m-d",mktime(0,0,0,1,1,$year-1)).":".date("Y-m-d",mktime(0,0,0,12,31,$year-1)); $alltime = date("Y-m-d",mktime(0,0,0,1,1,0000)).":".date("Y-m-d",mktime(0,0,0,$month,$day,$today)); ?>
  12. to get previous months... i use: <?php $lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y")); $lastmonth = date("Y-m-d", mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); //for your Y-m-d format ?>
  13. is the name in the database always going to be lower case ? if so... http://us3.php.net/manual/en/function.strtolower.php <?php elseif (strtolower($get_lastname) != $lastname) ?>
  14. or... http://www.phpeasystep.com/workshopview.php?id=2
  15. http://us3.php.net/features.file-upload check out example #3
  16. there is a php.ini setting which sets the amount of memory allowed to a script... try changing this.
  17. i use: http://www.maani.us/xml_charts/ use php to build the xml file... Works good for me.
  18. I generally allow every character but < and >
  19. <?php echo date('June', strtotime('-1 month')); ?> was evaluating each letter of June so like... J = u = Milliseconds (added in PHP 5.2.2) Example: 54321 n = Numeric representation of a month, without leading zeros 1 through 12 e =Timezone identifier (added in PHP 5.1.0) Examples: UTC, GMT, Atlantic/Azores
  20. pretty sure you would have to use the $_SESSION['loggedin'] and maybe try... <?php session_start(); if(isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == 1) { // ok } else { header("location: $secure_url/login.php"); exit(); } ?>
  21. another... <?php $time = "20:00:00"; $new_time = date("h:i", strtotime($time)); ?>
  22. can you pull them from the db and then do... <?php ... echo strtotime($row['time']); ... ?>
×
×
  • 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.