Jump to content

glennn.php

Newly Registered
  • Posts

    251
  • Joined

  • Last visited

Everything posted by glennn.php

  1. isn't it frustrating that humans are still wrong oftener than the computer is...???
  2. thanks for your help - for a particular project ID# (say, '123') i have to get all users from table 'users' AND IF a user, proj_id exists in table 'users_projects' (echo ' checked')... what i guess i'd do is SELECT * FROM 'users'... while ($row = ...) { echo "<checkbox"... SELECT * from users_projects WHERE projid == '123'... while ($row1 == ...) { echo ' checked'; } } but i can tell that that's either just plain wrong or at least very obtuse... if someone can decipher my intent could you possibly offer a more concise query that will get me ALL users AND tell me if the user, projid exists in users_projects, please? thanks much
  3. i'm using an ajax script to load these pages into a div, with pagination, and i'm wondering if there's a way to write this list of pages based upon a list of php variables that are provided conditionally, i.e. <?php if (!$text1 == "") { $page1 = page.php?text=1 } if (!$text2 == "") { $page2 = page.php?text=2 } if (!$text3 == "") { $page3 = page.php?text=3 } var bookonflowers={ pages: ["page.php?text=1", "page.php?text=2"], selectedpage: 0 //set page shown by default (0=1st page) } i appreciate any help someone might be able to provide. gn
  4. your function does not work as you've posted it. if there's something you've failed to mention, then you've proven my point.
  5. rather, someone who's busy trying to help someone else get a project finished by tomorrow and who doesn't even know where to start reading in all that in the link you sent me, much less have the time (i've spent an entire day trying to find something similar). when i see code work, i see how it works. as i said, i don't just copy and paste and forget about it. you're just a fucking grouch, admit it. the kind of help you offer people have to work around.
  6. i have an ENORMOUS amount of gratitude for the MANY people in forums, and especially this one, from who'm i've learned a GREAT deal about PHP and MySQL, and to whom i can credit my delight in my chosen (and fairly successful) occupation. in return i tell many other people who are attempting to learn of my experiences with most helpful people in these forums, and encourage them to use them. i ALSO gladly offer what assistance i can when there is someone asking for help which i can offer. This is how i've learned more than half of what i know. By someone 'writing the code for me'. i don't just copy and paste and be done with it. I've learned from ALL of it. I also tell these newer and eager persons that there are, occasionally, grouches who for some reason are in here to simply grumble and pretend to help, taking a lot of the joy of this poetry called code out of the whole equation. They seem to want to make it difficult for others who are really here to try to learn something, making others wonder why they're really in here at all. This is what makes me hesitant to want to ask anyone what the heck i'm supposed to do with that code that you so kindly wrote for me. i stuck it in the page in more than one place, and it preformed nothing. i don't know if i'm supposed to use a GET or POST to retrieve my value, because it didn't open a url.php (yes, i created one) for me to SEE what i'm supposed to do. I really am sorry to have bothered you, AK, and i surely hope that you're not too bitter over choosing to do someone else's work for them. I guess i'll go ask for help somewhere else and hope not to bother someone else too much. also, i think your tenses are mixed in your signature.
  7. right, that's what i want to do, but as i said, "i just don't know jquery or ajax at ALL". i'm asking for a little help doing this. i realize that the form value has to leave the page and return via a div, but that's all i know. i don't know jquery. i'm humbly asking for help. gn
  8. please, someone (anyone), i need to pass a select/option value to a php variable within the same page somehow using onChange. i've tried to find a similar configuration in these forums and netwide, but haven't been able to. should be simple. i just don't know jquery or ajax at ALL: <form id="catform" > <select id="cat" onChange=""> <option>Choose Category</option> <option value="Social Life">A Social Life</option> <option value="Movies - TV - Music">Movies - TV - Music</option> </select> </form> <div id="divid"> $cat = "cat selection"; </div> p.s. If there's a way to run a function from this same onChange event, that'd be pretty nice, too. I'm figuring to tackle that next. thanks VERY much in advance, gn
  9. i'm a jquery/ajax newbie, folks, sorry... i'm a php guy, tho, and i need a select formfield to update a variable for me (for a mysql query) and then call a js function using onChange: <div id="loaded-sidebar"> <script> // Loads left side content from a url function sidebarLoad(url) { var ajax_content_h = $('#ajax').height(); $('#ajax').css({'overflow':'hidden','height':ajax_content_h}); $('#ajax #loaded-sidebar').fadeOut(200,function(){ $('#ajax .overlay-icon').show(); }); $.ajax({ url: url, success: function(html){ preload_images(jQuery('img',jQuery(html)),function(){ $('#ajax').append('<div id="new-sidebar" style="width: 100%; visibility:hidden; overflow: hidden;">'+html+'</div>'); var new_h = $('#ajax #new-sidebar').height(); $('#ajax #new-sidebar').remove(); $('#ajax').animate({ height: new_h }, 1000, function() { $('#ajax').html('<div class="overlay-icon"> </div>'+'<div id="loaded-sidebar" style="display: none;">'+html+'</div>'); $('#ajax .overlay-icon').hide(); $('#loaded-sidebar').fadeIn(1000); $('#ajax').css({'overflow':'','height':'auto'}); cufon_replace(); init_popup(); init_dragable(); }); }); } }); } </script> <form action="#"> <select id="cat" onChange=""> <option value="Media">Media</option> <option value="Social Life">Social Life</option> </select> </form> <?php $cat = "form.cat value goes here"; $result = mysql_query("SELECT * FROM articles WHERE user_id = '$usr' AND article_description = '$cat' ORDER BY id DESC"); while(...); ?> </div> i'd be very much obliged if someone could help me out...? i do see that all that is within the very div that is being refreshed, and i'm not sure if that's a problem or not
  10. i have a client who'd like me to capture email content (well, the email address) that arrives through his domain in order to make it available for web content (same domain/website). has anyone ever heard of such a script or some means of doing this? thanks much, gn
  11. good enough, you have plenty of time, then. thanks for your help.
  12. right, thanks. and you look awfully young to know code this well...
  13. would this work? $string = $otherstuff; foreach ($emails as $email) { $string .= $email; } fwrite($fp,$string);
  14. using fwrite (i can handle that fine) i'm trying to find out how i'd get the results of this query $res = mysql_query("SELECT emails FROM email_list WHERE used != '1' LIMIT ".$limit." "); while ($row = mysql_fetch_array($res)) { echo $row['emails']."<br />"; } in such a form as i can then write it to a text file... can someone help me with this, please? much obliged, gn
  15. figured it out. i just tested for an existing file in another folder... if (file_exists(file.php)) { i'm in root/ } elseif (file_exists(../file.php)) { i'm in root/folder1/... } easy. solved.
  16. that's what i'm using, but that returns the entire server path: /home/content/n/j/l/njlieman/html/dir1/dir2/dir3 where i'm trying to get whether i'm dir1 or whether 2 or 3 - what i need is how deep i am below the root (html, or domain.com)
  17. i know how to get my current directory, and the root path, but what i'm needing to do is find the levels of the current dir, for instance, if i'm in: domain.com/folder1 or if i'm in domain.com/folder1/folder2 or if i'm in domain.com/folder1/folder2/folder3 can someone help? thanks much GN
  18. sometimes my fingers type what i'm um... thinking. ) - i'll remember that next time. sorry
  19. not sure how to describe this... having multiple rows of items, prices, i want to build a single form with which my client can change a number of prices where there would be a column of part nos along with their respective price fields, populated, so that he can change any number of them. i can get the values from the db and print them out into such a form, but i don't know exactly how to build the UPDATE query... does that make sense? thanks for your help. gn
  20. ok, so then i'd use them as data[0], data[1], etc... as long as there were values... ? thanks - i've GOT to learn arrays...
  21. ok, i have this small table with 'client_id' and 'p_net' as fields. the table will have several rows with the same client_id - i can get the array, "SELECT * from table WHERE client_id = '1'"; while ($row = mysql_fetch_array($query)) { echo "$row['p_net'].", "; } just fine, but i need to get EACH available p_net value into it's own variable so that i can use it elsewhere i've tried various foreach() methods inside the while() loop, but i'm not that good with it... help? thanks very much!! GN
  22. hell, i'm sorry, P. - i didn't realize switch() comes in javascript, too... my bad... 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.