Jump to content

amites

Members
  • Posts

    248
  • Joined

  • Last visited

    Never

Everything posted by amites

  1. my brain might be a little mushy but I'm having a hard time figuring out what you want help with specifically, you're on the right track, providing examples and code, but a specific question makes things go much more smoothly, not to mention helps train your brain to debug your own work
  2. if your talking about the URL in the address bar then the page has to reload, if you're talking about updating the content of the page to match id=1, id=2, id=3 then you want AJAX
  3. couple ways, 1 set the timezone (assuming PHP 5) - see http://us3.php.net/manual/en/function.time.php for instructions 2: create a function to alter the time before being displayed to sync up with the timezone you want to use, which can be scaled into a user selectable timezone 3: adjust the time before putting into your DB, which means not using now() statements but now() + INTERVAL X HOURS or something along those lines hope this helps
  4. if you just want to hide the extra columns when looking at the Forum, you can edit your template if ($_REQUEST['option'] != com_FORUM) { mos display column(forget exact code) } if you approach with an open mind and remain persistent then you can always figure out a way to accomplish your goal
  5. when you want to do things like this your best bet is to add another field and another table the new field would reference the table by a unique_id the new table references the level of access or whatever you want to define, this is a poor explanation, though I can't think of any examples off the top of my head, the way I learned was to open up a simple open source program that has a similar function to what you want to do and then work backwards, figure out how they did it, and in the process gain understanding, if you have a specific example you'd like help with it will be easier to offer an explanation, most of it comes down to smart code, if (user.level >= group.minlevel) { do code } else { echo 'you do not have access to do this'; } though you can do much of that in mySQL which is optimized for that sort of thing, for getting started you can work with any specific idea and figure out how to get it to work once, doesn't matter how sloppy the code is, then work on ways to make it cleaner, and leaner
  6. so if I read this right you want if (eregi('(.)+\\.(jpg$|gif$|png$|bmp$)', $string) { echo '<img src="LINK HERE" border="0" />'; } else { echo '<a href="LINK HERE" target="_blank">LINK HERE</a>'; } seems like you might want to think through your question a little more, this just seems way to simple (assuming your brain wasn't tapioca when you posted this)
  7. heh, originally tried doing that with FROM bil_city as cit ON cit.state_id = '13' = SQL error --- then I realized that the state_id is also in the bil_location table added an AND to the on clause for that line and boo yeah --- thank you for the help
  8. Hello, This one might make ya think, been racking my blain, example of what I want to do: SELECT cit.english name, Count(s.id) cnt FROM bil_cities AS cit Join bil_location AS loc ON loc.city_id = cit.id Join bil_msg_sent AS s ON s.locid = loc.id WHERE cit.state_id = '13' GROUP BY cit.id ORDER BY name ASC DB Structure: cities (every city in the US), location (contains, city_id, and loc_id) bil_msg_sent (what I'm trying to count based on id & loc_id) I'm trying to complete that query with Left Joins for bil_location and bil_msg_sent to have a complete list of Cities within a given state, of course once I change them to a Left Join it ignores the Where statement and tries to pull every city in the table, any ideas?
  9. Not sure what your asking, if you want to use a str replace on your output, you could process it after you get a result, $data2 = mysql_query($query2) or die(mysql_error()); while ($row = mysql_fetch_assoc($data2)) { $no_colons = str_replace(':', " ", $row['field']); } if you want to change the DB, add an update line to that while loop, if you're trying to do something else please think through the details of what you want to do, good chance you'll come up with an answer while writing your question
  10. without knowing what you have now it is very difficult to offer any suggestions that will help with anything beyond confusion
  11. for some additional notes this query does not give me any errors, nor does it provide me with any results, perpetually 0 changed the interval from 24 hour to 72 to 172 always 0 results, this query is written to do what I want with it, though I'm having syntax trouble, anyone out there that can point me in the right direction?
  12. simple script, write the promo code to a DB (or process it however you are tracking everything) then use the header('location: http://www.url.com'); to redirect, just make sure you don't print anything to screen on the redirect page http://us3.php.net/manual/en/function.header.php
  13. have you tried a basic test of your mail function? mail('email@address.com, 'subject', body');
  14. sounds like you want to work within a class, though hard to tell based on your question, rather vague
  15. ya beat me to it, take a look at the examples on that page, what you're looking for is fairly simple
  16. try a google search for php scrape there are a number of classes out there that will parse other files (what you re looking to have done)
  17. Hello, I'm having trouble figuring out why this query isn't working for me Code: SELECT Count(s.id) FROM bil_msg_sent AS s WHERE s.created BETWEEN now() AND now() - INTERVAL 172 hour AND s.active = '1' fairly straight forward, if you'd like I can post database info though I don't think it's needed, any help and/or advice is greatly appreciated
  18. rather simple really, simplest way would be to incorporate a CMS like joomla, following that try google for user management script etc... for the download joomla has a couple components that could handle it, or just create the link to a PHP file that would add to your DB tracking entry and set the header to the file
  19. I've come to appreciate http://www.tizag.com/mysqlTutorial/ helped a few friends I've been turning onto PHP
  20. get rid of the coma that cames before your primary key command
  21. essentially 2 ways, 1 is a good script that can queue the mailings, send off 20 - 100 at a time with a 10 minute pause between sends the other way is to send them all out as a single message making all the emails a BCC quite a few scripts that can queue up mail, try testing a few out, if you still have trouble send me a message and I'll see if I can help
  22. generate the name of each text box from the number of the question, ex: while ($row = mysql_fetch_assoc($result)) { echo $row['question'].' <input type="text" name="'$row['id'].'" /><br />'; } make sense?
  23. you could track page loads easily enough, are you re-using the same bar-code for the various coupons? if so good luck, any one person could print up 1 or 100 might be able to track that with javascript but getting the information back would be a whole nother thing...
×
×
  • 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.