Jump to content

amites

Members
  • Posts

    248
  • Joined

  • Last visited

    Never

Everything posted by amites

  1. I should have been more specific, checked on the results and the new lines were still there, after running the script, directly in mySQL and through PHP
  2. I was planning on building this into a php function and running it on my computer, if it works probably release it open source, seems like a simple way to save some time when building larger projects, not have to deal with tracking CSS classes and ID's just using good labels I'll see how that works
  3. thanks for the update, I gave it a shot and it didn't give me any results, no errors though... thinking I'm going to work on this tomorrow 16 hours is my limit once again I appreciate the help
  4. Hello, I'm rather new to writing Regex and have a simple request, what I have is a collection of scripts that I wrote rather quickly, now the scripts work and place things inside of different div boxes and other class and id definitions, however I Haven't created a css file to format everything and I'd like to create a function to parse a folder searching for all class names matching class="[class name]" and id names matching id="[id name]" then run that group through a foreach loop to write to a css file .[class name] { } #[id name] { } I can handle the opening the directory, and parsing the array once it's been built from preg_match_all though building the regex query itself is giving me some trouble, probably has to do with the 15 hour day I've pulled so far *heh* any help is appreciated
  5. Many thanks, that was getting annoying, now i have a new one... any chance of getting some help building a query to remove the new lines? hate to do it manually, just been staring at a screen to long to think it out right now...
  6. Hello, It doesn't seem like this should be to difficult, yet 6 hours on google has produced nothing for working examples to tinker with (perhaps I'm losing my Googlefu) I have a page that loads pieces of the form based on AJAX begins with a drop down menu, if I select from drop down 1, drop down 2 loads, select from drop down 2, either dorp down 3 or a form to populate new entry for drop down 3, works great, unless I decide that I want to change the selection in Drop Down 1 in which case drop down 2 reloads and drop down 3 remains, currently it passes selected value, and the next piece to work on figured I can add a 3rd variable to keep track of what pieces have been created, though that still leaves me trying to update multiple elements at once... any thoughts?? AJAX Load Script echo '<script type="text/javascript"> function Inint_AJAX() { try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} //IE try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE try { return new XMLHttpRequest(); } catch(e) {} //Native Javascript alert("XMLHttpRequest not supported"); return null; }; function dochange(src, val, step) { var req = Inint_AJAX(); req.onreadystatechange = function () { if (req.readyState==4) { if (req.status==200) { document.getElementById(src).innerHTML=req.responseText; } } }; req.open("GET", "components/com_lookout/' . $type . '-load.php?data="+src+"&val="+val); req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1"); req.send(null); } window.onLoad=dochange(\'states\', -1); </script>'; I'm not the strongest with Javascript so please be kind, this is my first attempt at AJAX
  7. Hello, I have a simple question, I have a query echo "<select name='locstate' onChange=\"dochange('cities', this.value)\" >" . "<option value='0'>".$txt_select_state."</option>\n"; $result=mysql_query("select `id`, `english` FROM " . $database_prefix . "states ORDER BY `english`"); while(list($id, $name)=mysql_fetch_array($result)){ echo "<option value=\"$id\" >$name</option>" ; } echo "</select>"; that is spitting out results that are alphabetical, though the first few lines show up at the end, for example: <select onchange="dochange('location', this.value)" name="loccity"><option value="0">Select a City:</option><option value="1031"> Brookside</option><option value="1032"> Claymont</option><option value="1033"> Dover</option><option value="1034"> Glasgow</option><option value="1035"> Hockessin</option><option value="1036"> Middletown</option><option value="1037"> Milford</option><option value="1038"> Newark</option><option value="1039"> North Star</option><option value="1040"> Pike Creek</option><option value="1041"> Seaford</option><option value="1042"> Wilmington</option><option value="1043"> Wilmington Manor</option><option value="1030">Bear</option></select> notice the last entry in the list? any ideas? in states with more cities in it I will get up to 8 or so of the first few rows showing up at the end in alphabetical order, so a, b, c, d, e, f, g would come out d, e, f, g, a, b, c this was working properly before and I don't remember changing anything, it just started running through this way, even after I reverted to an older copy of this script it's called by AJAX if that makes a difference any thoughts are greatly appreciated
  8. there is a forum for 3rd party scripts... that's my first idea after that I find it rather hard to understand your question...
  9. have you tried it? I recently was shown a fun one put $_REQUEST = array_map( 'mysql_real_escape_string', $_REQUEST ); at the beginning of your code, will run every $_REQUEST variable through the mysql_real_escape string function and leave them all intact
  10. why are you storing an image in your database? makes the server happier to store the directory of the image and then call it in normally.... just a thought
  11. are you trying to set a certain time or current time? current can be added with the mySQL value now() if your trying to post a specific time then you're best start is by printing out the value and making sure it matches what you want it to be, that line looks a little off to me
  12. create the time, adjust it by however many hours you want it to be adjusted by recreate the new time easiest way I know of to get around time zones
  13. not exactly, you want to list everything that has been uploaded? or display a list of what individual users have uploaded? or...
  14. funny, I tried writing and re-writing this query a dozen times and couldn't figure it out, then I went back and checked the data itself.... I had missed setting one of the fields to active = 1 from active = null now where can I find a dunce cap? also any reason why I can't mark this as solved? have something to do with the forum upgrade yesterday?
  15. they could fill it out, save it locally, and then upload and email it to you...
  16. if you don't have a web server search for a copy of WAMP (Windows Apache MySQL PHP) it's a small program you can install and have an Apache server running on your desktop (If you're not on windows then I'll leave you to figure it out, not to difficult with the help of good ol' google) and install Drupal on it, for tutorials try google video, or the Drupal forum's it's a rather popular CMS so there should be plenty of stuff, though being a hands on learner my approach would be to install WAMP and start playing it's designed to be simple to use, not quite Wordpress easy but not to far off
  17. create a link that will run the same query only set the header's to a text file, I don't know the setting for a text file off the top of my head, though taking a look at http://us3.php.net/manual/en/function.header.php will get you started in the right direction, once you have the header set print out the text to the screen
  18. Q1: depends on how secure you want everything to be, make it expire quickly or send a command to have it kill itself Q2: mod_rewrite these are not PHP questions, please try the appropriate boards for non-PHP questions
  19. This is a fairly simple problem to patch and not so simple to fix, the patch will involve accessing your server an the fix will involve taking time to rewriting the script to match newer versions of PHP my recomendation: hire someone, it doesn't seem as though you want to take the time to learn to fix this yourself
  20. time to start learning AJAX, not what this forum is for but that's how to do what you're looking for
  21. are you sure the variable is defined? what does show up?
  22. what does it show for you?
  23. have you tried searching for this yourself or did you go straight to asking for help? try taking a look at google you'll likely find a good place to start, I'm certain there are open source scripts to check email and place it into a DB, the CMS integration will be a little trickier to find without hiring someone,
  24. so you want to chop that last comma off? http://us3.php.net/manual/en/function.substr.php
×
×
  • 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.