Jump to content

n3ightjay

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Posts posted by n3ightjay

  1. you urls are set up wrong :

    http://www.mywebsite.com/php=id?001

    should be:

    http://www.mywebsite.com/php?id=001

     

    then you could just do something like

     

    if($_GET['id'] == 001){

    include(whatever.php);

    }

     

    but if you have alot of users you might want to learn a sql or you could name the include files with there ids instead and make a call like:

     

    if(isset($_GET['id'])){

    include('header' . $_GET['id'] . '.php'); // header001.php for example

    }

  2. Hi All im considering a new website venture ... with Credit card processing , i've never diped into this before (except via paypal) so say i have a brick and mortar buisness set up with a CC terminal what direction do i head in and what obsticles should i consider before taking on this task

     

    Just hit me with anything you can think of

     

    Thanks in advance

     

  3.           <select name="month" onChange="javascript:document.forms['form1'].submit();">
    <?
    for($newI = 0; $newI <= 3; $newI++){// $newJ <= 3 = 3 years ahead
    for($newJ = 0; $newJ <= 12; $newJ++){ 
    $dateValue = date("n Y",mktime(0,0,0,Date("m")+$newJ,1,date("Y")+$newI));
    ?>
    			<option value="<?=$dateValue;?>" <? if($_POST['month']==$dateValue){echo "selected";}?>><?=date("F Y",mktime(0,0,0,Date("m")+$newJ,1,date("Y")+$newI));?></option>
    <?
    }
    }
    ?>
              </select>
    

     

    That should fix both problems

     

    Cheers

  4. Try This:

    Replace

    <?php
    include_once('_init.php');
    if(isset($_POST['month'])){
    	$_GET['month'] = $_POST['month'];
    }else{
    	if($_GET['date'] != ''){
    		$exp = explode('-', $_GET['date']);
    		$_GET['month'] = $exp[1];
    	}else{
    		$_GET['month'] = date('m');
    	}
    }
    $_GET['date'] = '01-'.$_GET['month'].'-'.date('Y');
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    

    with this

    <?php
    //include_once('_init.php');
    if(isset($_POST['month'])){
    	$temp = explode(" ",$_POST['month']);
    	$_GET['month'] = $temp[0];
    	$_GET['year'] = $temp[1];
    }else{
    	if($_GET['date'] != ''){
    		$exp = explode('-', $_GET['date']);
    		$_GET['month'] = $exp[1];
    	}else{
    		$_GET['month'] = date('m');
    	}
    	$_GET['year'] = date('Y');
    }
    $_GET['date'] = '01-'.$_GET['month'].'-'.$_GET['year'];
    ?>
    

     

    And This

     

              <select name="month" onChange="javascript:document.forms['form1'].submit();">
                <? select_array($array_month, $_GET['month']);?>
              </select>
    

    with this:

              <select name="month" onChange="javascript:document.forms['form1'].submit();">
    <?
    for($newI = 0; $newI <= 3; $newI++){// $newJ <= 3 = 3 years ahead
    for($newJ = 0; $newJ <= 12; $newJ++){ 
    ?>
    			<option value="<?=date("n Y",mktime(0,0,0,Date("m")+$newJ,1,date("Y")+$newI));?>"><?=date("F Y",mktime(0,0,0,Date("m")+$newJ,1,date("Y")+$newI));?></option>
    <?
    }
    }
    ?>
              </select>
    

     

    Once again be real cautious with the links under the dates as I can't follow the updates effect on the sql querys

  5. To simply shift the calendar from monday to sunday try this date call in your calendar output:

     

    <td width="100" align="center" class="<?=$class;?>"><?=date("j", mktime(0,0,0,$zi[1], ($j+($i*7))-date("w",mktime(0,0,0,$zi[1],0,$zi[2])),$zi[2])).$detail;?></td>

     

    this will undoubtedly mess up the querys associated above it ... but using the same alteration to the date in the querys should be a starting point but it's something im not going to attempt without the database itself.

     

    As for the month it has to be altered in your include_once(_init.php) file which i obviously don't have access to.

×
×
  • 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.