Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by techker

  1. You could update your dates with a single line of mysql


    UPDATE mytable SET datefield = STR_TO_DATE(datefield, '%e-%m-%Y')[code]


    then change the type to DATE


    thx for the help guys.

    this will take the date a convert it?

  2. Hey guys i insert my date as:01/14/2013 so m-d-y



    how can i make it so that the mysql recognizes my dates:


    i got this but it doesnt work..


    $today = date('m-d-Y');
    $d1 = 'SELECT * FROM '. $row5['Fiscale_Sortie'] .' WHERE DATE(Date_Rempli)  = "$today"'; 
    $result8 = mysql_query($d1) or die(mysql_error()); 
    $total_rows8 = mysql_fetch_row($result8);

  3. sorry why do you mean read?i have a form that is used to realy the post..


    <?php if (!empty($_GET[success])) { echo "<b>CSV Importer!.</b><br><br>"; } //generic success notice ?> 
    <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"> 
     Choose your file: <br /> 
     <input name="csv" type="file" id="csv" /> 
     <input name="Year" type="hidden" value="<?=$Fiscale?>" />
     <input type="submit" name="Submit" value="Submit" /> 


    csv looks like this


    7864804 Abraham Mohamed Masculin 5 ABRM27079607 501

  4. Hey guys im stuck on this code that keeps on putting " " in my tables?


    i save the xls file to csv comma delimited.


    when i upload it ,i get "name" "age"....


    i think it the '".addslashes($data[0])."',



    if ($_FILES[csv][size] > 0) { 
       //get the csv file 
       $file = $_FILES[csv][tmp_name]; 
       $handle = fopen($file,"r"); 
       //loop through the csv file and insert into database 
       do { 
           if ($data[0]) { 
               mysql_query("INSERT INTO  $Year (Ecole,N_Fiche,Nom,Prenom,Code_P,Foyer,Secondaire,Annee,Sortie) VALUES 
       } while ($data = fgetcsv($handle,1000,",","'")); 


    nice new look by the way.

  5. Hey guys i have a portal that im doing for invoicing..


    i have a page that shows all the unpaid invoices..


    i put a check box next in the form...how can i select multiple selection and print the total amount of the selected with the invoice numbers.??




    check box. invoice 2122  total 200$

    check box. invoice 2123  total 200$

    check box. invoice 2124  total 200$

    check box. invoice 2125  total 200$

    check box. invoice 2126  total 200$



    so the print out would be



    2122-2123-2124-2125-2126 total before tax:1000$




  6. Hey guys i have a form that shows the full name of a student.


    like student : Micheal Jackson


    i need to search the database for that student.


    but my tables have first name and last name

    so the issue i have is i got the full name when in my database i have 2 columns first and last name...


    so in phpmyadmin i tried the search tab.


    so i pasted the full name in


    first and tried LIKE-LIKE%% =....


    but nothing worked??

  7. ya..lol looking at this post  noticed the code is not the same..i posted an older page..wow


    this is the autosuggest.php


       $db = new mysqli('localhost', '2' ,'2', '2');
    if(!$db) {
    	echo 'Could not connect to the database.';
    } else {
    	if(isset($_POST['queryString'])) {
    		$queryString = $db->real_escape_string($_POST['queryString']);
    		if(strlen($queryString) >0) {
    			$query = $db->query("SELECT Nom,Prenom FROM Etudiant_2013 WHERE Prenom LIKE '$queryString%' LIMIT 10");
    			if($query) {
    			echo '<ul>';
    				while ($result = $query ->fetch_object()) {
             			echo '<li onClick="fill(\''.addslashes($result->Nom).'\');">'.$result->Nom.'</li>';
    			echo '</ul>';
    			} else {
    				echo 'OOPS we had a problem ';
    		} else {
    			// do nothing
    	} else {
    		echo 'There should be no direct access to this script!';

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