Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. I used to use / .. / but since that symbol comes up a lot in regexing html (which is a common thing for people to use regex for, for web dev), I migrated to ~ .. ~
  2. I'm mostly not impressed by it because it isn't hard to make something like that. The 'hardest' part of it is the 'real time' part in which you would have to use some ajax or flash. You could make something like that completely server side with just a submit button to update, in a few lines of code (minus layout, of course).
  3. You forgot closing quote for your query string and closing parenthesis for your mysql_query
  4. $queryset=mysql_query("select * from pictures where setname='$setname'"); echo "<table id='setthumbs'>"; echo "<tr>"; while($rowset = mysql_fetch_array($queryset)){ echo ($c % 3 == 0)? "</tr><tr>" : ""; echo "<td><a href='#' onclick=\"picchange('$rowset[id]')\"><img src='images/s-$rowset[id].jpg' ></a></td>"; $c++; } echo "</tr></table>";
  5. Would help if you tell us what the error is.
  6. SET is a reserved word if you want to use it as a column name, you have to put backticks around it `set` better thing to do would be to change it to a diff column name, as using reserved words is bad practice.
  7. none of those should have failed. Your error is somewhere else.
  8. <<<EOT is heredoc (scroll down a bit) Dunno if that's what you really want, but yeah..
  9. my first guess would be because of the space between 'Nadeem Sarwar'
  10. Thread closed. You already have a thread about this. Please do not post multiple topics asking the same thing.
  11. That's what the manual would have you believe...
  12. $recipient="[email protected]"; $subject="Registration Information"; error_reporting(0); if (mail($recipient, $subject, $msg)){ header("Location: somepage.php"); exit(); } else echo "An error occurred and the message could not be sent."; } else echo "Bad request method"; Note: that will only work if there is no output before that header call. If you have output before that header call, refer to the sticky about headers in this forum.
  13. Be more specific. That code sleeps 1 second for every 100 foreach loop iterations, regardless of how many elements there are in the array. What more do you want it to do?
  14. I see them come up on occasion. Maybe once every 2-4 weeks or so. And even then, they cover a wide range. Questions about OSs, vs. random software vs. hardware. Fixing vs. upgrading vs. Buying new xyz. TBH though, even if there were a lot of questions coming in on a consistent basis, I'm not sure I'd agree to having a forum for that. Our community is for a specific thing: PHP. We allow other things that are related to PHP, depending on how directly they are related to PHP. IMO a 'Computer' forum is stretching it too far. I mean, if we were to somehow (mysteriously, no doubt) start getting a ton of traffic related to dogs, would we make a forum for them? I would hope not... I would agree that computers are more closely related to PHP than dogs, but that doesn't mean it's related enough.
  15. The purpose of this forum is to provide a means of communication between the staff and community. Please consider the following, before posting: You may post in this forum to.... Ask a question, comment or concern about the main site. Examples are: Requesting a feature for the main site. Reporting a bug on the main site. Requesting an article, tutorial or other main site content. Telling us what an awesome/terrible job we are doing! [*]Ask a question, comment or concern about the forums, IF it has to do with something administrative (NOT IPB code related). Examples are: Requesting an xyz forum. Reordering of forums. Reporting broken/outdated links/stickies. Requesting new stickies. [*]Ask a question, comment or concern about site or forum policy. Examples are: Regarding acceptable content. Interpretation of main site or forum rules. Requesting addition/removal of a rule. If your thread conforms to these things, before posting..... Read the general rules. These rules cover general conduct, as well as policies concerning your personal account/content. Read the stickies! There is a very good possibility your question/comment/concern has already been addressed! Look for similar threads! Even if it hasn't made it to sticky status, it may still have been addressed in someone else's post. We don't expect you to scour through pages and pages of posts, looking for something posted who knows how long ago. But at least look on the first page or two... Put some thought into your post! If you want something added or removed, be it feature, content or policy, don't just tell us; tell us why. You may NOT post in this forum to.... Make suggestions about altering the forum's core coding. If there is an IPB mod out there you'd like to see implemented here, you can suggest it. If there is not a mod, we may consider making our own mod, if it sounds cool enough. But note that we are not associated with the IPB development team or community. We simply use their board, just like other people. So if you are looking for a way to have IPB code changed or extended for your own site, you are in the wrong place! Report a forum bug. Note, there is a difference between some setting that could be changed (or is set a certain way because we want it to be), vs. a genuine bug in the forum software. If you are looking for clarification about ability to do something (like edit posts) then refer to stickies/rules, or ask if you do not see your issue addressed there. But for genuine bugs in the forum software...again, we are NOT part of the IPB team/community! Go report it on their site! Make posts that belong in other forums. This includes, but is not limited to, asking for help on your script, where to find xyz script, or arbitrary threads from "So...what's your favorite xyz" to "What do you think about xyz site?" We have a variety of forums that cater to all sorts of things. Use them! If you do not follow these rules.... Your thread may be deleted, closed or moved to its proper location. A warning or other action may be issued to you. Ignorance of the rules is not an excuse!
  16. Are you talking about the form not populating the posted vars? Is that 2nd code above the first code in the script?
  17. yeah, meant 0-9 = 3 chars vs. \d = 2 chars don't really see the point, unless they were to say, make the current \d mean that, and make the current \d something else (so that people can logically know that \d means digit)
  18. eh. I can understand reducing a-zA-Z0-9 to something shorthand but 0-9 would just be reduced 1 character. Don't really see the point.
  19. ah! read your book, I know you got one. It's leftovers from old school times when regex was originally thought to be most useful for sorting through code. The _ used to be part of variable naming convention back in the day. edit: Though I do agree, should have a shorthand for 'real' word words.
  20. Touché
  21. actually, I looked at your first query: $query = mysql_query("SELECT * FROM city ORDER BY city DESC"); That query is probably wrong. I doubt your table AND column names are both named 'city'
  22. Nothing wrong with your code. Must be one of your queries. echo $sql; in your outer loop, see if it's holding what you expect (the $row vars). c/p it directly into your db, see if it returns expected results.
  23. $adreg = '/^[\w ]{1,50}$/'; win!
  24. fyi putting a ' ' matches a single space, \s matches a space, tab or linebreak.
  25. you aren't allowing for spaces in your class. do $adreg = '/^[a-zA-Z0-9 ]{1,50}$/'; or $adreg = '/^[a-zA-Z0-9\s]{1,50}$/';
×
×
  • 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.