Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. google smf site integration or go to simplemachines.org and enter site integration in the search. There are a ton of mods and built in hooks for doing that.
  2. Could clean up your php code a bit, but that won't really help on your html output. I suggest looking into making a style sheet (CSS). You can use CSS to assign colors, attributes, dimensions...pretty much anything, and then replace all that stuff in your tags with a simple id='blah' or class='blah'. That should significantly reduce your filesize.
  3. umm...umm... erm...strip_tags is a function from the php parser. The php parser executes it and parses the string. I don't really see how the script being on a windows server would affect the strip_tags function... I mean, I could be wrong, but I don't think so... even checked the manual and there's no notes about that... so I'm thinking your problem is somewhere else.
  4. You do know that like 99.99% of account/website cracks are not done by decrypting things (like someone's password), right? And that 0.01% really only exists because of people foolish enough to use very outdated methods or nothing at all. You should focus more on controlling/sanitizing input and making sure the script's logical flow is solid.
  5. You must have copied it before I edited it. I accidentally put = instead of == in the condition.
  6. Thread locked. There are a ton of "what books/tutorials/etc.." type of posts around here, including stickies.
  7. <table align="center" border="1" > <?php // while there are rows to be fetched... while ($list = mysql_fetch_assoc($result)) { $color = ($color == '#FF0000')? '#0000FF' : '#FF0000'; ?> <tr><?php echo "<td bgcolor='$color'>" . $list['orders_id'] . " , " . $list['customers_name'] . " , " . $list['customers_street_address'] . " , " . $list['customers_suburb'] . " , " . $list['customers_city'] . " , " . $list['customers_state'] . " , " . $list['customers_postcode'] ."<br />"; } ?></td> </tr> </table>
  8. I was under the impression that readfile is used for including static files etc.. like for streaming mp3's or outputting a gif or something, while include is used for dynamic files (scripts). I think they can be used interchangeably in certain situations, but still... anyways, for a straight speed test, I found this: http://www.raditha.com/wiki/Readfile_vs_include
  9. That kind of sounds scare and accusatory... is it? Anyways, I thought the idea behind open source communities is kind of a "Survival of the fittest" or "Natural selection" mentality. That is, if you make something openly available, it will stand or fall on its own, instead of hiding behind 'walls.' Also, it broadens the creativity pool, because it stands to reason that 10 heads are better than 1.
  10. I don't really see how you can accidentally move your curser all the way up to the refresh button... but anyways... Couple of possible suggestions: - Add a timestamp of some kind to your table. Check when the last time a user inserted something into the database and don't insert if it's < x time. I suppose someone could wait until after x time is passed and then hit the refresh button, but it would prevent those initial "accidental" refreshes. - Run a query on all the posted vars and check if there is a row where all the posted vars match. If a row is returned, then don't insert a new row. This isn't really efficient...mostly depends on how many vars there are and what's in them... - Use a javascript event handler to prevent user from using refresh button. Downside is that user can easily disable it. If we're talking about "accidental" refreshes, I don't think you need to worry about that...though the user may not have javascript enabled in the first place... - As cronix suggested: make a session variable and check for it. Don't allow insertion if it exists. And no, we cannot provide you with the code. We aren't here to write the code for you. Just point you in the right direction and help you fix bugs in your own code. If you want code written for you, hire a freelancer.
  11. I'd like to mention though that the manual's notes do point out that there is not a significant decrease in performance, while at the same time, it provides significant added value.
  12. fetch_assoc only fetches associative array. fetch_array fetches both associative and numerical. Stands to reason fetch_assoc is faster. Could do a test to find out tho...
  13. That's because there's a typo. Come on man...
  14. Are you trying to prevent someone from resubmitting info in general, or just avoid posting the same thing twice if you accidentally refresh?
  15. I'm thinking pay per click and cost per click.
  16. You can use file to read the contents of the file into an array (each line is an element), and array_unshift to prepend an element to that array (insert the new line at the beginning, if you are wanting newest -> oldest) or array_push to put it on the end of the array (insert new line at end, if you are wanting oldest -> newest). From there, if this script is only being called every $x time, you can use array_slice to get the first or last 100 elements. If the script is being triggered every request or something, you can use an array_shift/array_push combo to take first element off while putting new one on end, or use an array_pop/array_unshift combo to chop off the last element while putting new on at the beginning. From there, all you have to do is run a loop to write each element of the array back to the file (don't forget to add the line breaks to the element you are unshifting or pushing).
  17. That means that there is no column called 'title' in your table. Column names are case sensitive. Do you have it capitalized in your table?
  18. I smell homework question.
  19. Not sure about the animated gif part but if you google watermarking tutorials you should get what you need as far as overlapping 1 image onto another.
  20. Not really sure what you're doing before the query, but if I read your intention correctly, why can't you do something like this? $q = "SELECT sum(`weight`) as totalweight FROM `products_ship` WHERE `model_number`='$model_number'"; $result = mysql_query($q) or die("Problem with the query: $q<br>" . mysql_error()); $row = mysql_fetch_array($result); echo $row['totalweight'];
  21. I didn't know that either, though coincidentally I actually do do that when I'm posting to itself.
  22. You have your php on your page without checking whether form info was sent or not, so when page first loads, you're going to automatically get an email with a bunch of empty values. Upon form submission you should have been receiving another email with actual stuff. Are you not ending up with 2 emails? Also, use $_POST instead of $_REQUEST
  23. If the groups have no apparent link to them, why split them up in the first place? Why not just pick a random one to begin with? Or...if they have no apparent link to them, but you are wanting to have the person stay with the same "group" then why not just pick $x amount of websites (enough for 1 group) and then link them to the person? I guess you're going to have to be more specific in your intentions...also, you first say 1000 groups but later you say 1000 pages. Those are two different numbers of IP addresses, so which one is it, groups or pages?
  24. What doesn't work?
×
×
  • 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.