I'm putting together a POC script just to test email functionality. The script works but I want to add some redundancy to it. In its current form, it sends an email using the IP address of an SMTP server (and it works as planned). What I need to do is to check that it worked and if it didn't...
I need to use rand() to generate pseudorandom numbers. They won't be used for cryptographic purposes so the true randomness is not a concern - they just need to be different from previous ones. What I need to do is to generate numbers that do not appear in a mysql query. I thought I would...
I need to create a button within a PHP script that, when clicked, takes some information from the script and runs another PHP script to perform a MySQL query and display the result in a popup window. I believe AJAX is the way to do it but I don't know where to start. I need guidance on the AJAX...
I have an onSubmit form validation function. It works ok, but if it finds an error, it resets the whole form. Is there a way to have it not reset the whole form?
I have a form with several select boxes. On the last box, I need two things to happen: First, when an option is selected, the Submit button gets enabled (disabled by default). Second is that if one specific option is selected, a hidden field is shown.
I had this working perfectly using...
I've got a working PHP script that changes Active Directory passwords. The one problem I have is that I can't pass a password with a & in it because it breaks the powershell command. Is there a good way to escape that?
Here is what I'm running:
$adpwchange = shell_exec("powershell...
I'm submitting a form to an update script. After the form is submitted, and depending on what is submitted, more information may be needed by the update script. How can I create a popup form that will pause script execution, get more information (from dropdown boxes), then take the info back...
I have two tables table1 and table2. Each is over 1 million rows. Table2 has some records that are also in table1. I need to delete the rows from table2 that are also in table1. I've tried this:
delete * from table2 where record in (select * from table1 where record like "1%");
Both...
I'm looking to validate a PHP form before it gets submitted. I've seen this and it looks promising, but I need more options.
Here is the PHP code that I'm using to validate an already submitted form. I'd like to transform it to javascript so it can be validated before submission. Since I'm...
I'm using sessions with LDAP authentication. After the session expires, if the user clicks on anything on the current page, they're brought to the login screen. On login, they're dumped at the default home page. What's the best way to get the user back to where they were? Do I need to log...
I'm not holding out much hope, but I'm hoping to find someone who has successfully created a PHP script that will allow the changing of a user password in LDAP. The LDAP server must be Windows 2008 Active Directory. LDAPS is working. I've tried every method I can find, but none work. I don't...
I have some PHP scripts that execute basic LDAP queries against Windows 2008 AD. These work fine. I'd like to switch to LDAPS but I can't get it to work. I'm not able to bind. I've made sure that LDAPS works on the AD server by using the Windows tool LDP.EXE locally and from the Apache...
I've got a PHP login script that uses LDAP for authentication. As it is now, it just sets $_SESSION['user'] based on the result of the LDAP query. Obviously just checking that $_SESSION['user'] is set is not a good way to secure things as it can be easily guessed. What's a good way to make it...
I have an 2007 Excel spreadsheet. One sheet is a master list of "stuff". For the second sheet, I'd like for it to be a carbon copy of the master sheet, but with some conditional formatting on the cells (basically alternating colors for each row). The problem that I'm having is if I use...
I'm having trouble getting a backup copy of all the pictures on an iPhone. Using USB, I'm able to see the ones that are in the Camera Roll, but I can't get the rest that are in a separate album. Is there a way?
I need to add some more pictures to the phone, but I'm afraid that it will...
Since I couldn't find a Regex forum, I figure readers here would be able to help. I'm using Python scripts (PyWikipediabot) to make some updates to a private Wiki. One of the things I'm trying to do is to select all the text on a page and replace it with new content. The closest that I've...
I have a database that stores dates as UTC. I need to perform a query but convert the output to local time. Is there an easy way to do that? It's also important that the query find items relative to local time.
The date column would have entries hourly and I would want to spit out a result...
I have a spreadsheet formatted with alternating colors for the rows. When I update the content of the rows, I'd like the colors to stay the same. This doesn't work when I need to insert rows. Is there a way to do this?
Running SQL 2005 Ent SP2. I've got a database that's about 64GB in size. I perform a full backup once per day and transaction log backups every 20 minutes. I need to have the backups dumped to two different locations - preferably within the SQL maintenance plans. If I do it in one maintenance...
I need to perform a query that will check to see if an entry matches part of a string. For example, if the string is abcd1234, I need to find any entries that match any four consecutive characters in the string (e.g. bcd1 or d123).
Is this possible?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.