Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Posts posted by techker

  1. hey guys wheat is the recommended carracter settings?

     

    cause i have tryed utf8 unicode,utf8_general_ciand i still cant see the special caracters?

     

  2. ok so its to late to think it over.already lots of data in there.

     

    now i have notice that when i did this i added a line month.

     

    so is there a way to select  all from fc were month =january and date is befor 01/01/2009

     

     

  3. CREATE TABLE `fc` (

    `id` int(4) NOT NULL auto_increment,

    `company` varchar(200) NOT NULL,

    `contact` varchar(20) NOT NULL,

    `number` varchar(20) NOT NULL,

    `units` varchar(20) NOT NULL,

    `PTO` varchar(20) NOT NULL,

    `store` varchar(20) NOT NULL,

    `date_issued` varchar(20) NOT NULL,

    `date_done` varchar(20) NOT NULL,

    `times` varchar(20) NOT NULL,

    `custom_rate` varchar(20) NOT NULL,

    `notes` varchar(200) NOT NULL,

    `travel_times` varchar(20) NOT NULL,

    `travel_charge` varchar(20) NOT NULL,

    `paid` varchar(30) NOT NULL,

    `month` varchar(25) NOT NULL,

    `year` varchar(20) NOT NULL,

    `client_id` varchar(20) NOT NULL,

    `service_call` varchar(100) NOT NULL,

    `done` varchar(50) NOT NULL,

    PRIMARY KEY  (`id`)

    ) ENGINE=MyISAM AUTO_INCREMENT=164 DEFAULT CHARSET=latin1

  4. hey guy in my databse the date is as :04/06/2009

     

    i have a querry that counts the number of installed units done

     

    SELECT COUNT( `units` ) AS TotalNumber, SUM( `units` ) AS Totalunits FROM `fc`"
    

     

    now i need to calcule the number of units done in a year and by months?

     

    i tryed this

    SELECT COUNT( `units` ) AS TotalNumber, SUM( `units` ) AS Totalunits
    FROM `fc` 
    WHERE 'date_issued' >01 /01 /2009(afther this date) gives me NULL
    
    

  5. If they've done it via a firewall, an SSH tunnel would be your only hope.

     

     

    SSH tunel?can it be done by script or by software?think they will block it to?why do they put limits like that?

  6. hey guys i found out today that my hosting companie will not let outside mysql connections..only self server connection..

     

     

    i was thinking of installing wamp on the pc and making it connect to the databse to get information..

     

    is there a way to bypass that??

  7. thx for the info.would there be any reason why it sometimes when you selectect multiple times or go thrue the categories it gets confused and does not show the client id anymore it likes looses it?

     

    and is it possible to multiply this script on one page?cause when i try it the refresh does all the copies..

  8. interesting!

     

    $HTTP_GET_VARS was deprecated, so use $_GET instead

    cool understood

     

    your echo'ed $noticia2[category]'s should be replaced with {$noticia2['category']}, same with $noticia[pic] to {$noticia['pic']}

     

    why use {

    and why is it working?

  9. hey guys i have this list box that when you select what categorie you want it refresh's the page to get the infor from a databse.

     

    now it works fine but somethims when you play arraound to mutch with the select box it does notretain the user id?

     

    <?php
    session_start();
    if(!session_is_registered(myusername)){
    header("location:login.php");
    }
    $_id=$_POST['_id'];
    $client_id=$_GET['client_id'];
    
    require "config2.php";
    
    $connection = mysql_connect($dbhost, $dbusername, $dbpass);
    	$SelectedDB = mysql_select_db($dbname);
    
    
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>GRAPH</title>
    <SCRIPT language=JavaScript>
    function reload(form)
    {
    var val=form.cat.options[form.cat.options.selectedIndex].value; 
    self.location='ex9.php?_id=<? print"$client_id"?>&cat=' + val ;
    }
    function reload3(form)
    {
    var val=form.cat.options[form.cat.options.selectedIndex].value; 
    var val2=form.subcat.options[form.subcat.options.selectedIndex].value; 
    
    self.location='ex9.php?_id=<? print"$client_id"?>&cat=' + val + '&cat3=' + val2 ;
    }
    
    </script>
    <script type="text/javascript">
    function swapImage(){
    var image = document.getElementById("imageToSwap");
    var dropd = document.getElementById("subcat");
    image.src = dropd.value;	
    };
    </script>
    </head>
    
    <body>
    <img id="imageToSwap" src="http://www.webworkout.info/Account/images/gymgraphb.jpg" />
    <? $quer2=mysql_query("SELECT DISTINCT category FROM category order by category");
    $cat=$HTTP_GET_VARS['cat']; // This line is added to take care if your global variable is off
    $c_id=$HTTP_GET_VARS['_id']; 
    echo "<form method=post name=f1 action='dd3ck.php?client_id=$c_id'>";
    //////////        Starting of first drop downlist /////////
    echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Select one</option>";
    while($noticia2 = mysql_fetch_array($quer2)) { 
    if($noticia2['category']==@$cat){echo "<option selected value='$noticia2[category]'>$noticia2[category]</option>"."<BR>";}
    else{echo  "<option value='$noticia2[category]'>$noticia2[category]</option>";}
    }
    echo "</select>";
    
    if(isset($cat) and strlen($cat) > 0){
    $quer=mysql_query("SELECT DISTINCT pic,id FROM $cat" ); 
    }else{$quer=mysql_query("SELECT DISTINCT pic,id FROM $cat "); } 
    
    echo "<select name='subcat'onChange='swapImage()' ><option value=''>Select one</option>";
    while($noticia = mysql_fetch_array($quer)) { 
    if($noticia['pic']==@$cat3){echo "<option selected value='$noticia[pic]'>$noticia[pic]</option>"."<BR>";}
    else{echo  "<option value=/Account/PICS/$cat/$noticia[pic]>$noticia[pic]</option>";}
    }
    echo "</select>";
    
    echo "<input type=hidden name='location' value='1'>";
    echo "<input type=submit value='Submit'></form>";
    
    ?>
      <label><br />
      </label>
    <p>
    <p> </p>
    </body>
    </html>

     

    this part makes it always post the info

     

    var val=form.cat.options[form.cat.options.selectedIndex].value;

    self.location='ex9.php?_id=<? print"$client_id"?>&cat=' + val ;

     

     

    see any mistakes in the script???

  10. i found this but i can't seem to modify it for me?

     

    function countdown($event,$month,$day,$year) {
    // subtract desired date from current date and give an answer in terms of days
    $remain = ceil((mktime(0,0,0,$month,$day,$year) - time()) / 86400);
    // show the number of days left
    if ($remain > 0) {
    print "<p><strong>$remain</strong> more sleeps until $event</p>";
    }
    // if the event has arrived, say so!
    else {
    print "<p>$event has arrived!</p>";
    }
    }
    
    // call the function
    countdown("Christmas Day", 12, 25, 2008);  
    

  11. hey guys  im made a scanning system that when the member scans his id card it gets info from the databse

     

    nam and if there is a message in his file.

     

    i want to add an alert like there is x day's left to the end of your contract..

     

    i have in the databse the created date and the end date.

     

    how can i calculate the remeinder of days ?

  12. hey guys i made a script for my boddy and it is only used on on PC now i have multiple little scripts to run and i don't want to make a login on each..is it possible to allow access only with his ip?

  13. all the scripts i find is for triggering sound thru a button not with an event?and i would need to mix it with php?

     

    like select * from table WHERE member_id=$id

     

     

    if date ==today alert sound....

  14. hey guys im doing a script for when a member scans his card(barcode0it gets his info in a databse .now it's a membership information,

     

    is it possible that if the membership is expired it sound an alarm ?

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