ikmyer
Members-
Posts
109 -
Joined
-
Last visited
Never
Everything posted by ikmyer
-
mind if i ask where your pulling the data from ?
-
yeah, biggest custom app i have made has about 70,000 records in one table... no sweat.
-
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.
-
thanks but didn't work... got 404
-
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
-
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.
-
try... $select = "SELECT COUNT(session_id) FROM carttemp WHERE session_id = $id";
-
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.
-
use the var: $_SERVER['SCRIPT_FILENAME'] http://us3.php.net/manual/en/reserved.variables.server.php
-
just wondering... why are you looking for a different way?
-
JD*'s code will always work... it changes both strings to all lower case then compares them
-
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)); ?>
-
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 ?>
-
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) ?>
-
or... http://www.phpeasystep.com/workshopview.php?id=2
-
http://us3.php.net/features.file-upload check out example #3
-
creating large zip files.... anyway to prevent running out of memory?
ikmyer replied to scooter41's topic in PHP Coding Help
there is a php.ini setting which sets the amount of memory allowed to a script... try changing this. -
i use: http://www.maani.us/xml_charts/ use php to build the xml file... Works good for me.
-
I generally allow every character but < and >
-
that actually work ??
-
Is PHP supposed to show this? 'J0000005America/New_York'
ikmyer replied to DanielWhite's topic in PHP Coding Help
<?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 -
[SOLVED] Put a variable in another variable somehow?
ikmyer replied to anolan13's topic in PHP Coding Help
try... $total = total_size("$files/"); -
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(); } ?>
-
another... <?php $time = "20:00:00"; $new_time = date("h:i", strtotime($time)); ?>
-
How do I convert date and time to int(10) format from YYYY-MM-DD HH:MM?
ikmyer replied to Dave_77's topic in PHP Coding Help
can you pull them from the db and then do... <?php ... echo strtotime($row['time']); ... ?>