Jump to content

Moron

Members
  • Posts

    369
  • Joined

  • Last visited

Everything posted by Moron

  1. Like the title says.....is there a simple way to export an entire MS SQL table to XML? I don't need to select specific fields or filter the data in any way. Thanks.
  2. Here's the weird thing.... I don't have that Loaded Configuration File entry when I run phpinfo(). Not at all. I have it when I run it on my local box (with Wamp 5), but not on this server.
  3. Thanks. That's what I was afraid of. This is a very busy server. EDIT: wait a second..... Do you mean to restart the actual computer or the website? If you mean the website, I already did that. This one is on IIS and I stopped and restarted the default website. I uncommented the php_ldap.dll module, restarted the website, yet there's still no LDAP section in the phpinfo () file. Ideas?
  4. This is probably a lame question, but like the title says, how do you restart php so that php.ini changes will take effect?
  5. Huh? Connecting to the AD server is exactly what I want to do. Maybe I didn't explain it very well. I want to: 1. Have the user enter their Windows domain (AD) username and password. 2. Upon doing so, their username will be set as a $_POST variable by which their info will be selected from the database. I don't really want the "single sign-on" model at work here; I want the user to actually have to log into the info system, even though they're already logged into Windows. Thanks.
  6. I need php to perform one seemingly simple task: log the user into an information screen using their Windows username and password. Nothing fancy. No AD searches or anything like that. Currently, they log in using their employee number and the last four of their SSN, both of which match database fields. If I can get the AD connection working, then I'll make a new SQL table that contains their Windows username and use that for selection of their info. But everything I find seems to be geared toward some sky-high purpose for which I have no need.
  7. I have a php program where an employee enters their employee number as username and the last four of their SSN as the password. These two parameters match MS SQL database fields. The problem is that this is sent in clear text. I need it to be encrypted. I looked into just using AD authentication, but the concept doesn't seem to like me very much. So is there a simple way to encrypt the passwords between the php input form and the database? Thanks!
  8. I'm "assuming" that this will be Javascript, since "target=_blank" clearly isn't going to cut it. My form link is: <form action="pagename.php" name="pagename" method="post" target="_blank"> When the window pops up, it's roughly half the screen size. I want it to be maximized (NOT actually fullscreen, but just maximized). Is there an easy way to do this?
  9. I see. Well... is there a way to just simply use a form of "not blank?" Thanks. How would I use this against my database field? He probably meant to suggest that you will have to iterate through all rows and update accordingly using php. This is something you should to prior to inserting thereafter.
  10. Thanks. How would I use this against my database field?
  11. This is probably dirt simple but I can't seem to think of the function at the moment (see my username). What function checks to see if a database field contains an alpha character? If a person has a middle initial, I want to put a period after it. If no middle initial, then no period. Thanks.
  12. I removed it and .....it WORKS! Thanks, everyone.
  13. But here's the kicker: if I put an <HTML> tag before the above code, then it works in IE 8, but throws errors in IE 7. We're running PHP 5. The URL isn't accessible from the outside as this is strictly an intranet application.
  14. This is running internally, so no outside access. The top of one of the pages is.... <?php ini_set('session.bug_compat_42',0); ini_set('session.bug_compat_warn',0); session_start(); if(isset($_POST['password'])) {$_SESSION['password'] = $_POST['password'];} if(isset($_POST['empcode'])) {$_SESSION['empcode'] = $_POST['empcode'];} header('Content-Type: image/jpeg'); ?> <html> <head> <title>Employee Information</title> Again, it works perfectly in IE 7 and back. Try this in IE 8 and you get the code displayed. I'll go out on a limb in assuming that it's some new "security" feature in IE 8, since that's usually how Microsoft does things, but I could be wrong.
  15. Anyone else seen this? My program, which works 100% perfectly in IE7 and back, displays php code in IE8. My pages begin with session commands at the top. If I put an <HTML> tag before that, it works in IE8 but then it throws errors all over the place in IE7 and back. Ideas?
  16. It's fixed. I forgot to adjust this in my second query, the one that actually pulls the results. It explains my username.
  17. I tried it and it makes no difference, either using ASC or removing it completely. It's like it's not recognizing either ASC or DESC for some reason.
  18. My query (abbreviated): $RESULTDS=mssql_query("SELECT M2.[hrYRAT], PA.[PSTU39], PA.[PSTU54], PA.[PSTU55], PA.[PSTU57] FROM MASTERL2 M2 LEFT JOIN PAYSTUBS_Archive PA ON PA.[PSTUB2]=M2.EMPNO WHERE PA.[PSTUB2] = '".$_SESSION['empcode']."' ORDER BY PA.[PSTU57] desc"); In the ORDER BY statement, I can remove the "desc" part and it makes no difference. The field it's ordering by is a date field in the format of 20081115, 20090110, etc... (year, month, day). Thanks! EDIT: I want the most current date on top of the list, thus the "desc" part.
  19. You're a lifesaver. Thanks a ton!
  20. How do I do this? I don't want to PRINTF() something right here and now, but I want to format it so I can use substr() on it later. $endingdate = printf ("%08d", $RESULT['PSTUB5']); I want to zero-fill this field to make it eight characters (if the date is 1152009, I want it to be 01152009, etc...)
  21. The situation is that I'm pulling data from three tables. In one of them, I need to specify ONLY a certain year. The query is: $RESULTDS=mssql_query("SELECT DISTINCT M2.[NAMEL], M2.[NAMEF], M2.[NAMEMI], M2.[EMPNO], M2.[MSSNO], M2.[MEMPAD], M2.[MEMPZI], M2.[MEMPCS], M2.[NAMETI], WF.[EMPN], WF.[W2YEAR], WF.[WEMPSX], WF.[WRET], WF.[EMPWH], WF.[EMPGRS], WF.[EMPFIC], WF.[EMPFGR], WF.[MEDTAX], WF.[FICATX], WF.[TERM], WF.[WTSTAT], WF.[WPYCTR], WF.[EMPUW], WF.[EMPINS], WF.[EMPDC], WF.[EMPPLN], WF.[EMPDR], WF.[EMPDR], FR.[FRAMT], FR.[FYEAR] FROM MASTERL2 M2 LEFT JOIN W2FILE WF ON M2.[EMPNO]= WF.[EMPN] LEFT JOIN FRINGE FR ON WF.[EMPN] = FR.[FEMPNO] WHERE M2.[EMPNO] = '".$_SESSION['empcode']."' ORDER BY WF.[EMPN] desc"); I can echo W2.[W2YEAR] and it comes up as 2008. FR.[FYEAR] does the same, 2008. Then why does FR.[FRAMT] keep pulling the record from 2007????? Thanks!
  22. Good thinking, but here's the problem. If there's a negative number there, I want to display it as a positive number using the abs() function. But.... I have to make this determination while it's still in its raw (negative) form in the database.
  23. Okay, if I use.... if ($VARIABLE > 0) { echo $VARIABLE; } ...everything works great....until a field has a negative number, then it doesn't display. If I use... if (VARIABLE > -1000000) { echo $VARIABLE; } (any insane negative number will do), then everyone gets a zero, since zero is greater than a negative number. Ideas?
  24. Never mind. Total bonehead error. I was using a second query on the same page and it was missing a necessary element. Thanks to all for your help, though!
×
×
  • 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.