Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Everything posted by techker

  1. Hey guys i made a script for a school and they would like to intergrate the script in an existing portal they have for the school.. so is there a way to bypass my login script?like a page that sends info to the checklogin page? this is my page checklogin: <?php include"login_config.php"; //Connection String Variables_________________________________________________ // connect to the server mysql_connect( $db_host, $db_username, $db_password ) or die( "Error! Could not connect to database: " . mysql_error() ); // select the database mysql_select_db( $db ) or die( "Error! Could not select the database: " . mysql_error() ); //IBM suggested scrub for URL request $urlun = strip_tags(substr($_REQUEST['username'],0,32)); $urlpw = strip_tags(substr($_REQUEST['password'],0,32)); $cleanpw = md5($urlpw); //echo"Cleanpw: $cleanpw<br>"; //$sql="SELECT * FROM agents WHERE username='$urlun' and password='$urlpw'"; $sql="SELECT * FROM users WHERE username='$urlun' and password='$cleanpw'"; $result=mysql_query($sql); // Mysql_num_row is counting table rows $count=mysql_num_rows($result); // If result matches $myusername and $mypassword, table row must be 1 row //echo"Count:$count<br>"; if($count==1){ // Register $myusername and redirect to file designated success file $cookie_name ="$cookiename"; $cookie_value ="$urlun"; //set to 24 hours $cookie_expire ="86400"; setcookie($cookie_name,$cookie_value,time() + (86400),"/", $cookie_domain); header("location:$successful_login_url"); }else{ header("location:$failed_login"); } ?> and my login form <form action="checklogin.php" method="post" name="form" id="form"> <div id="login"> <h2>Ouverture de session</h2> <label for="username">Nom d'utilisateur:</label> <input type="text" name="username" value = '<? //echo $username; ?>' /> <label for="password">Mot de passe:</label> <input type="password" name="password" value = '<? //echo $password; ?>' /> <input name="submit" type="submit" value="Entrer" /> <div class="clear"></div> </div> </form>
  2. hey guys i have a litle script really basic that creates a flat file DB with content(news) so i use it for a news page .. it works great but it creates a diffrent file for every entry.thats ok but im trying to make a delete.. i googled flat file db delete but only see content or specific line delete in a flat file.. i can`t see delete the flat file db..
  3. this works now. $query = "SELECT N_Etudiant, Professeur FROM Expulsion GROUP BY N_Etudiant, Professeur HAVING COUNT( * ) >=2 LIMIT 0 , 30";
  4. none.thats what im asking..just for the part of the echo results..
  5. for the query its good.but when it comes to show the results of the query the echo confuses me..
  6. Hey guys i have a big problem..lol i know how to do the query's but it's the show results that i have issue's with..i always get confused.. like i dd this in php my admin SELECT * FROM Motif a INNER JOIN Expulsion b USING(Motif) now it works in my admin ..but now im confused on how to show the results.. any tips on this?
  7. good question.im using smartftp.never noticed this..
  8. Hey guys i have a litle uploader that i need to upload an access db file(mdb) it works ,it uploads and all... but once on my linux server i try to transfer it to my pc via ftp and it does not work..i can't even delete the file.. how can i use it?
  9. what about something like this if($fileLIST) { $row = mysql_fetch_array($fileLIST); $ret["Etudiant"] == >2 $row["Prof"]; } echo $row['Etudiant'] ;
  10. ya but it has to be student with teacher more than two no? cause the teacher can be repeated with other students or even that student can have a detention with other teachers..
  11. hmm cool.what would the echo look like? echo ['COUNT(Etudiant')
  12. hey guys i have this query up to know that works like i need..but i would like to add an if clause to trigger a notification if the student has more then 2 detentions with the same teacher?? k i got this going shows me the count and the student ///search student teacher repeat fr $fileSQL="SELECT COUNT(*), `Etudiant`, `Prof` FROM Rapport_R\n" . "GROUP BY `Etudiant`, `Prof`\n" . "HAVING COUNT(*)>1"; $fileLIST=mysql_query($fileSQL); ///french\\ <? while ($row = mysql_fetch_array($fileLIST)) { ?> <? echo $row['Etudiant'] ?> a <? echo $row['COUNT(*)'] ?> retenues Avec le Professeur <? echo $row['Prof'] ?> </br> <? } ?> the DB has ID-Etudiant-Prof-Day-Notes
  13. clear of my question.i just want some guidance.thats all i need
  14. Hey guys is there a way that in my form i have a select student to insert in db. i need it to when the teacher selects a student it looks in database for history..like a pop up message if the query found something? cause this is a detention script..so the teacher registers the student in detention. in the form i have a select student but we need to have a warning when the students has 2 detention with the same teacher... is this clear?lol
  15. i got it the script going but it's only the check time and i need to put some css..lol to make like a small red square with the number in it.. cron is a good idea.thx
  16. i just want a script that could look in to my DB every 20min and count the rows of in a table then display it .. like in facebook on top were there is messages
  17. Hey guys what should i look for in a script to make a small script that gets the DB information and shows notifications? like messages(3) members(23) ..... i know count rows can do it.i think?
  18. hey guys i have this echo (empty($info['ID_Etudiant'])? "No image": "<img src=Etudiants/".$info['photo'] ." border=0 width=100>"); the echo pic if thee is one in database works.but if there is no pic in database it shows nothing?
  19. see the attached..this is my menu. [attachment deleted by admin]
  20. Hey guys i have a php page with a icon navigation. im looking for a type of ajax tabs that loads content on the same page..but all the scripts i find have <li> since im using images as a navigation i cant use <lil> is there a way? exp. <li class="nav-one"><a href="#featured" class="current">Featured</a></li> <li class="nav-two"><a href="#core">Core</a></li> <li class="nav-three"><a href="#jquerytuts">jQuery</a></li> <li class="nav-four last"><a href="#classics">Classics</a></li> but i have <tr> <td rowspan="17"> <img src="images/01MainFR_24.gif" width="15" height="1116" alt=""></td> <td colspan="5"> <img src="images/01MainFR_25.gif" width="237" height="41" alt=""></td> <td rowspan="16"> <img src="images/01MainFR_26.gif" width="16" height="1075" alt=""></td> <td colspan="19"> <img src="images/01MainFR_27.gif" width="724" height="41" alt=""></td> <td rowspan="16"> <img src="images/01MainFR_28.gif" width="8" height="1075" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="41" alt=""></td> </tr>
  21. Hey guys im installing an x-cart module for my buddy and in the install doc it says 3b. In include/product_modify.php, add: /* BCSE Begin - Advanced Filter module */ if($active_modules['Advanced_Filter']){ include $xcart_dir."/modules/Advanced_Filter/product_modify_get_fields.php"; } /* BCSE End */ Before the last instance of: whats this? if (empty($product_info)) { this is the lines.. if (empty($product_info)) { if ($login_type == 'A') { $providers = func_query("SELECT id, login, title, firstname, lastname FROM $sql_tbl[customers] WHERE usertype='P' ORDER BY login, lastname, firstname"); if (!empty($providers)) { $smarty->assign('providers', $providers); } else { $top_message['content'] = func_get_langvar_by_name('msg_adm_warn_no_providers'); $top_message['type'] = 'W'; $smarty->assign('top_message', $top_message); $top_message = ''; $section = 'error'; /* BCSE Begin - Advanced Filter module */ if($active_modules['Advanced_Filter']){ include $xcart_dir."/modules/Advanced_Filter/product_modify_get_fields.php"; } /* BCSE End */ } } else { $product_owner = $logged_userid; } } else { $product_owner = addslashes($product_info['provider']); } if (!empty($product_owner)) { $provider_info = func_query_first("SELECT id, login, title, firstname, lastname FROM $sql_tbl[customers] WHERE id='$product_owner' AND usertype IN ('P','A')"); $smarty->assign('provider_info', $provider_info); } $gdlib_enabled = func_check_gd(); $generate_thumbnail = ''; if ($REQUEST_METHOD == 'POST') {
  22. so i can understand the inner join will only join the both databse with the same info and not bother the other information?
  23. ok so this a select..i need update? EDIT..i mest up wrong file.. this is my query to update the prices.. $sql4 = "UPDATE xcart_pricing p LEFT JOIN TbItemInventory pp ON p.productid = pp.XcartID SET p.price = pp.SalesPrice WHERE p.membershipid = 1 "; $retval4 = mysql_query( $sql4 ); if(! $retval4 ) { die('Could not update data: ' . mysql_error()); } ////6 $sql5 = "UPDATE xcart_pricing p LEFT JOIN TbItemInventory pp ON p.productid = pp.XcartID SET p.price = pp.SalesPrice2 WHERE p.membershipid = 5 ";
×
×
  • 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.