Jump to content

Moron

Members
  • Posts

    369
  • Joined

  • Last visited

Everything posted by Moron

  1. Probably a stupid question, but I can't seem to figure it out.
  2. Thanks, but I really want to find a package that will help with the overall project. Writing it from the ground up will take a long time.
  3. As the title implies, I'm looking for a decent open source (php/mysql) form package. I've tried a few and, so far, they're either too simple or too complex. Go figure. ??? My needs are pretty basic; the user fills out the form online (local intranet), clicks Submit, the entry is stored in a database and (optionally) an e-mail is sent. I don't have a problem tweaking some code, but I want to expedite the overall development. What do you folks use?
  4. Never mind. I forgot to stop and restart Apache.
  5. I've checked the PHP manual and done numerous searches in Google. I uncommented the "extension=php_ldap.dll" line in php.ini. I've copied the .dll files to WINNT\SYSTEM32 on the server where PHP is installed. Is there a way to confirm that the LDAP connection is working? I keep getting: Fatal error: Call to undefined function ldap_connect() in C:\Wamp\www\oneorzero\common\common.php on line 146 In case anyone is curious, I'm trying the OneOrZero help desk system. Ideas?
  6. Yeah, that's how I was trying to hit it from across the network. The adjustment that made it work was "Allow all" on the directory. Thanks!
  7. Listen 8000. Everything works like a champ on the local box. It's just that I can't hit the pages from across the network.
  8. Okay, I installed Wampserver on a Windows Server 2003 box today. IIS was already in place and running so I redirected Apache to port :8000. I can hit... http://localhost:8000/ ...just fine on the local machine. Of course, I also had to redirect PHPMyAdmin to be... http://localhost:8000/phpmyadmin/ Works fine. Phpinfo() shows up fine, healthy MySQL, etc.... This server is inside our firewall and will be ONLY used internally for Intranet-type applications. Now the problem: When I try to pull up pages on this server from my own computer, I get the "Unauthorized" business. I'm trying to hit http://192.168.2.69:8000/localhost/ Unauthorized. I tried hitting a specific php file in that path. Same result. I've tried everything I can think of in the httpd.conf file (restarting Apache after each tweak). The folder structure itself is also set to Everyone, Full Control. 192.168.2.99 is the IP address of the server itself. Should I be assigning a seperate IP for the Apache install? Any help is appreciated.
  9. This was working before I had to make some query changes. In the query: WHERE M2.[EMPNO] = '".$_POST['empcode']."' and M2.[Last4SSN] = '".$_POST['password']."' They log in with their employee number and last of of the SSN. So far, so good. Then they hit a sub-page. All is well. When they click a link to go back, it doesn't accept their username or password (or both). Each page has the following at the top: session_start(); if(isset($_POST['password'])) {$_SESSION['password'] = $_POST['password'];} if(isset($_POST['empcode'])) {$_SESSION['empcode'] = $_POST['empcode'];} I don't know what's causing this, but it was working until I changed the WHERE statement this morning.
  10. Thanks for the help, everyone. I suspect that the trick is to incorporate the substr() function into the query itself somehow. Anyway, the problem is solved, but not via PHP; we're going to add another field to the table which lists the last four digits of everyone's SSN. Thanks again!
  11. I guess what it boils down to is.....how can I create a variable that uses data from the query before the query is ran? $_POST['empcode'] ...is the employee's ID number. It's four digits. $_POST['password'] ...is the last four of the employee's SSN. BUT....the database field has the entire SSN (all nine digits). I can easily run substr() on the SSN (M2[MSSNO]), but only after I pull the SSN with the query. Can this be done? It looks almost like a "chicken and egg" riddle.
  12. Thanks again, but this is error city. Yes, MS SQL supports substr() and I'm using it in several places. It just doesn't seem to like it in a query.
  13. Let me see if I can break this down into simpler terms. If I run this: $tempnumber = $RESULT['MSSNO']; $ssntest = substr($tempnumber, -4); echo $ssntest; ...it gives me exactly what I'm looking for, the last four of the SSN. But, this only works if I run it after the query. I suppose this is because $RESULT['MSSNO'] doesn't exist until the query is ran. So how can I do a similar technique inside the query, or at least define a function before the query is ran? I suspect that would do what I want. And Ray, thanks a TON for your help so far!
  14. Okay, maybe we're getting somewhere now. It gives me "passwords don't match" as stated in your code. One thing, though; forget about "lastfour." This is lastfour: $lastfour = substr($_SESSION['password'], -4); // returns last four of password I must have been asleep when I wrote that one. I need the password, as entered by the employee, to match the last four digits of M2[MSSNO]. What should I try next? EDIT: Specifically, I need for $_POST['password'] to match the last four of M2[MSSNO]. This is their SSN.
  15. Maybe the entire query will help: $RESULTDS=mssql_query("SELECT DISTINCT LH.[Employee Number], M2.[hrYRAT], M2.[EMPNO], M2.[MANLAP], M2.[PAYCTR], M2.[MANLAC], M2.[MANLTC], M2.[MSKLAB], M2.[MSKLTC], M2.[NAMEMI], M2.[NAMEL], M2.[NAMEF], EH.[DATE], EH.[ENETPA], EH.[EGRSER], EH.[EREGHR], EH.[EDEDUC], EH.[EROTHR], EH.[EFWHD], EH.[EPEDAT], EH.[ESSDED], EH.[EHOSPD], EH.[ELIFED], EH.[ECRUD], M2.[POSITN], M2.[MCTDWH], M2.[MHDATE], M2.[MCTDCS], M2.[MO3TOT], M2.[MCTDLD], M2.[MCTDGE], M2.[MALPPP], M2.[MSLPPP], M2.[MWHSTA], M2.[MWHALL], M2.[MWHADD], EH.[EGARND], EP.[EMPNO], DP.[EMPNO], EI.[DDEPTN], EI.[NEWOCC], EI.[hrYRAT], EI.[MEMPAD], EI.[MEMPCS], EI.[MEMPZI], DP.[Department] FROM MASTERL2 M2 LEFT JOIN LEAVHST LH ON LH.[Employee Number]=M2.EMPNO LEFT JOIN EARNHIST EH ON EH.[EEMPNO]=M2.EMPNO LEFT JOIN EMPPICTURE EP ON EP.[EMPNO]=EH.EEMPNO LEFT JOIN Departments DP ON DP.[EMPNO]=EP.EMPNO LEFT JOIN View_EmployeeInfo EI ON EI.[EMPNO]=M2.EMPNO WHERE ((M2.[EMPNO] = '".$_POST['empcode']."' and $lastfour = '".$_POST['password']."') or ($lastfour = '".$_SESSION['password']."' and M2.[EMPNO] = '".$_SESSION['empcode']."')) ORDER BY M2.[EMPNO] desc"); What I really WANT to have work is: WHERE ((M2.[EMPNO] = '".$_POST['empcode']."' and '".$_POST['password']."' = substr(M2.[MSSNO], -4)) Is is just that my syntax is wrong (missing quotes or whatnot) or is this query not logical?
  16. Thanks again, Ray, but it still goes to the "die" statement.
  17. Thanks, Ray, but this one crashes because, apparently, it's not pulling from M2.[MSSNO]. It goes to my "die" statement.
  18. Thanks, but it errors. It says that the "substring function requires 3 arguments."
  19. Thanks, but it's throwing errors.
  20. Okay, I edited the title. BUT....how do I incorporate this into the above query -OR- how do I define "$lastfour" BEFORE the query, since it uses data returned BY the query?
  21. Sorry for the panic, but.... Here's the query: $RESULTDS=mssql_query("SELECT DISTINCT LH.[Employee Number], M2.[hrYRAT], M2.[EMPNO], M2.[MANLAP], M2.[PAYCTR], M2.[MANLAC], M2.[MANLTC], M2.[MSKLAB], M2.[MSKLTC], M2.[NAMEMI], M2.[NAMEL], M2.[NAMEF], EH.[DATE], EH.[ENETPA], EH.[EGRSER], EH.[EREGHR], EH.[EDEDUC], EH.[EROTHR], EH.[EFWHD], EH.[EPEDAT], EH.[ESSDED], EH.[EHOSPD], EH.[ELIFED], EH.[ECRUD], M2.[POSITN], M2.[MCTDWH], M2.[MHDATE], M2.[MCTDCS], M2.[MO3TOT], M2.[MCTDLD], M2.[MCTDGE], M2.[MALPPP], M2.[MSSNO], M2.[MSLPPP], M2.[MWHSTA], M2.[MWHALL], M2.[MWHADD], EH.[EGARND], EP.[EMPNO], DP.[EMPNO], EI.[DDEPTN], EI.[NEWOCC], EI.[hrYRAT], EI.[MEMPAD], EI.[MEMPCS], EI.[MEMPZI], DP.[Department] FROM MASTERL2 M2 LEFT JOIN LEAVHST LH ON LH.[Employee Number]=M2.EMPNO LEFT JOIN EARNHIST EH ON EH.[EEMPNO]=M2.EMPNO LEFT JOIN EMPPICTURE EP ON EP.[EMPNO]=EH.EEMPNO LEFT JOIN Departments DP ON DP.[EMPNO]=EP.EMPNO LEFT JOIN View_EmployeeInfo EI ON EI.[EMPNO]=M2.EMPNO WHERE M2.[EMPNO] = '".$_POST['empcode']."' AND $lastfour = '".$_POST['password']."' ORDER BY M2.[EMPNO] desc"); I need their entered password to match the last four of the SSN (M2.[MSSNO]). I can put this AFTER the query: $lastfour = substr($RESULT['MSSNO'], -4); But how can I define it BEFORE the query or INSIDE the WHERE statement? Thanks. EDIT: I just went "live" with this today and discovered that an employee can put another employee's employee number with ANY password and it works. NOT GOOD.
  22. Okay, a crazy (but hopefully simple) beginner question..... my organization just recently started running MySQL with a new Joomla-based website. How do I make backups of the database? Is it adequate to just back up the folder path where the database resides or is it more involved than that? Thanks!
×
×
  • 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.