Jump to content

solarisuser

Members
  • Posts

    122
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

solarisuser's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Hey All, Can mkdir() set ownership by a particular user? Thanks
  2. Hi All, One of my jquery scripts asks for a default number to display. Instead of hard-coding this in the script, I'd like to figure out how to grab a php query string and pass it to the script. For example: 1) In the jQuery script.... "pages: 10" 2) URL will be, index.php?pages=10 How can I have the jQuery script see the pages variable in the URL? BTW - I've tried a few jQuery scripts that help with this but none of them worked, so I'd hopefully someone can help me out. Thanks!
  3. Hi All, I'm trying to figure out if a while loop is what I really need to use. My goal is to copy a dynamic amount of data from C:\ to D:\. I have a routine to detect the used hard disk space on C:\ and the free disk space on D:\. If D:\ does not have enough space for the copy, I delete a folder, then I want to run the code again to detect the used hard disk space on C:\ and the free disk space on D:\. If I still need more space, I delete another folder, and run the code again, etc. Right now I run the code to detect the hard disk size, and if I need to delete a folder, I have: while($size_to_copy > $size_free) { // delete folder // run code to update $size_to_copy and $size_free } However, running code inside the while loop to generate an updated $size_to_copy and $size_free do not seem to tell the while loop of the new values. Any direction on my next steps would be great - thanks!
  4. thanks but i got that part down no problem. the thing is, while im reading each line of text i need to use some regex to find out if that line has two occurances of "\" and delete that line, then continue... I need to use regex because the data is dynamically generated
  5. Hi All, I have a text file that contains directory paths. My goal is to delete the line from the text file if it has exactly two "\" characters, no more and no less. I've thought about using count_chars() but I can't figure out the best way to integrate it with preg_match_replace or something of the like. Any help would be much appriciated! Thanks
  6. I'm trying to add 180 days to an existing date, and then make sure if the month is a single digit, I want to add a 0 before it. For some reason its just not working, I am hoping someone can point out my error... thanks! var dateStr = "08/22/2001"; var millis = Date.parse(dateStr); var newDate = new Date(); newDate.setTime(millis + 180 *24*60*60*1000); var newDateStr = "" + (newDate.getMonth()+1) + "/" + newDate.getDate() + "/" + newDate.getFullYear(); myarray = newDateStr.split(/\//); if( myarray[0] <= 9 && myarray[0] >= 0) { var save = "/" + myarray[0] + "/"; alert(myarray[0]); newmonth = "0"+myarray[0]+"/"; alert(newmonth ); myregexp = save+"/"; alert(myregexp); newDateStr2 = newDateStr.replace(myregexp, newmonth ); alert(newDateStr2); }
  7. very cool , thanks. i was looking for something not using strlen and tons of if statements...
  8. Hi All, I have data in an array like this "12345, 56789, KL5-1231231,KL5-1230502". Is there a function that I can use to say.... if string length of each piece of the array is less than 6, put it in this array, and the rest of the data entries go in another array. For example: $original_array = ("12345", "56789", "KL5-1231231","KL5-1230502"); some_function_here... $array1 = ("12345", "56789"); $array2 = ("KL5-1231231","KL5-1230502"); Thanks
  9. I'm not sure how to do that =( I'm using JSON syntax to return the results and fill in the fields. Do I need to focus on using a function() that does something like .. var field = document.getElementById('country').value; if(field.length > 0) { document.getElementById('second_dropdown_id').update_second_dropdown(); } ?
  10. Hi All, I am using AJAX in a form so when someone enters a country, it populates the fields with the population, etc. This works fine in text fields. Then I am using a JS script that links two dropdown menus, so when you select "A" in the first dropdown, it does a mysql query and shows only the results relating to A in the second dropdown. This works fine when clicking on it. The problem: When I type in a country, AJAX fills in the first dropdown menu just fine. However the second dropdown menu does not update. When I click on the first dropdown menu, then it works. I would like to know how can I make the second dropdown update when AJAX fills in the first dropdown. Right now, I'm using onchange="update_second_dropdown();" on my first dropdown.... any suggestions would be a big help! Thanks!
  11. Hi All, I am using AJAX in a form so when someone enters a country, it populates the fields with the population, etc. This works fine in text fields. Then I am using a JS script that links two dropdown menus, so when you select "A" in the first dropdown, it does a mysql query and shows only the results relating to A in the second dropdown. This works fine when clicking on it. The problem: When I type in a country, AJAX fills in the first dropdown menu just fine. However the second dropdown menu does not update. When I click on the first dropdown menu, then it works. I would like to know how can I make the second dropdown update when AJAX fills in the first dropdown. Right now, I'm using onchange="update_second_dropdown();" on my first dropdown.... any suggestions would be a big help! Thanks!
  12. Hey There, Can you please post your code in [ code] (minus space) so I can see it all =)
  13. For daily, thats easy. Make a new field called "daily", and have the login code update that field with the CURRENT_TIMESTAMP whenever a successfull login occurs. Then for the actual code to determine if they are the first, you can select daily from table where daily != '', and figure out how to order the timestamp so the earliest one is first, and then use LIMIT 1 to get it. then grab the uid from that result and you know who it was...
  14. Look at Apache configuration on "UserDir"
  15. You should be looking at the limitations imposed by the web server (Apache, IIS, etc)
×
×
  • 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.