Jump to content

dannyb785

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by dannyb785

  1. A couple things... what is FilterCChars? why do you have -lvincent@ci.durham.nh.us in the additional parameters of the first email? on the line that says "$emailFrom = FilterCChars("$FTGemail");" where is the FTGemail variable? the main reason I think it's not working is because in your first email, you have the headers set to say "From: USER WHO SUBMITTED DATA". Thing is, that user won't have the same email domain as your domain(i.e. if you are drainage.com, he might have submitted something@gmail.com) and I know many servers won't send email if the "From" is not the current domain. Cuz think, you could send an email pretending to be someone else to do phish attacks... and those aren't very nice! My suggestion. Replace the $emailfrom variable with "donotreply@YOURDOMAIN.com" where YOURDOMAIN is the domain of the website that the info is being submitted on. Give that a try. If no luck, then come back here.
  2. Ok, first off, why are you adding a backslash to something that you grabbed from the database? I ask because it should have already been escaped. And if it made it in the database fine to begin with, then you surely don't need to grab it and then re-addslashes. You'd only need to addslashes if any completely new data is being inserted(and thus, you dont know if you'd been to addslashes). secondly, indent you code. It makes it TONS easier to see whats going on when you have it like this: <?php mysql_connect("localhost","root",""); mysql_select_db("ameex01") or die("could not select the database"); $sql = "select * from node_revisions where nid=11973"; $rs = mysql_query($sql); if(mysql_num_rows($rs)>0) { while($obj=mysql_fetch_object($rs)) { $body_chunksplit = $obj->body; $nid=$obj->nid; $body_chunksplit=str_replace("'", "\'", $body_chunksplit); // $lrn = strlen($body_chunksplit); //$length=$lrn*2; if(strlen($body_chunksplit) >= 4500) { $body_content=break_up($body_chunksplit,'<--pagebreak-->', 4500); //$body_content=substr(chunk_split($body_chunksplit, 4500, "<--pagebreak-->"), 0, $length); //echo $body_content; //drupal_set_message(wordcount($body_content)); //$update_query="UPDATE node_revisions SET body='$body_content' where nid='$nid'"; } else { $body_content=$body_chunksplit; } if(isset($body_content)) { $affect=mysql_query("UPDATE node_revisions SET body='$body_content' where nid='$nid'") or die("could not$nid"); //$affect=mysql_query($update_query)or die("could not at '".$nid."'"); } } } ?> thirdly, what does your function "break_up" do? and lastly, what is the error you're seeing? a message or just a blank screen?
  3. You can't have spaces in your column name. Replace them with an underscore. You also need to do addslashes() in your $_POST variables bc if someone with the last name O'reilly submits their name, they'll get an error(not to mention those who want to hack the system). I also think I read somewhere that columns can't(or shoudlnt) start with a number. But that might not be a requirement. Also: it may not seem important now, but it will be of utter importance later if you have lots of users, you need to format the data types of your database correctly, allowing just enough space, but not too many. For example, you have the username/userpass as a text data type. A text takes up a good bit of space and should only be used for messages, posts, and possibly comments. But never something that will only, at most, have 20 characters. I suggest a varchar with a value of 20 or 25(and then use php code to enforce the character limit so the user knows). Same deal with email... I've never seen a (non spam) email address that has 100 characters. Image trying to tell someone your email address if it's that long! Also, your totalpoints is set to int(100). If I remember correctly, that's 100 bits. Meaning it will hold a value as high as 2^100. That is a huuuuuuuuuuuuuuuuuuuuuuuuuuuuge number. Unless your totalpoints adds up atoms in the universe, you'll never need a value that big reserved And on the other hand, you have Full Name being only 10 characters? Besides Al Gore, I don't know of many people whose full names are only 10 characters long. Make it something like 50 or so.
  4. And if your program/game is really that amazing, everyone will want to buy it anyways, regardless of it there are hacks out there
  5. This is key to getting redirects right. Sure, you may accidentally add output before the header, but I see lotsa code where people type all this html outputting text and then try to redirect but... if they really wanted it to redirect(and if headers redirected after output was made), the user would never see the text anyways.
  6. ^ but what would we be posting a link to? I remember, to practice css, replicating the layout of a certain site and after I was finished, looked the same in all 4 major browsers. Then in check the html of the actual site, they used conditionals. That kinda threw me off..
  7. Oh, I guess it would've been more clear if you said "I appreciate" When you said "I'll appreciate" it made it sounds like they havent helped you yet
  8. You can only do anything manually. It never guesses what you want to do. You have to tell it everything
  9. then go to them. You're like the customer that says "Well, so and so restaurant love me and always give me a free dessert on my birthday" and to them, I say 'well why dont you go there???'
  10. When you insert a row, if the database is setup correctly(that is, if you set it up correctly), a unique and incrementing id will be created with each row. When you want to update the contents of the row, you're trying to do insert, with the hopes that it will reinsert the row that you just inserted? Think about it... how will it know which row you want to update? The correct(and only) way to do that is UPDATE and you have to know the id(or any value) of the row you're trying to update. So if you have a user table and you want to update the user with the user_id of 5, you'd do UPDATE User SET user_name='$name', etc etc WHERE user_id='5' doing INSERT will only ever create a new row(unless you're trying to insert a row with an already specified id that you previously deleted, in order to simulate an update, which you should NOT EVER do).
  11. but ... they have helped... what more do you need?
  12. I agree completely. first thing I noticed. And yea, dashes, from what I've seen on the web, are usually only used when dragging and item or box somewhere. And the header looks neat!
  13. The problem is if you update what variable? And how are you trying to update it now, which is giving you the problem?
  14. I disagree, I've never used a conditional comment or hack with the exception of a min/max width expression for ie6, which I only did once. Once you learn the way each browser handles the box model you can create your css accordingly. The key in my opinion is never to use padding on elements with fixed widths and set margins on inner elements instead of padding on the outer elements. The box model is pretty much what gets people in trouble. I can get my css to work on all browsers without hacking it. Yeah, I've had plenty of well-working designs with no hacks or conditionals. They just aren't necessary and show an impatient coder who says "I'd rather cheat my way around this issue than find out what the problem is and fix it"
  15. You only have 8 posts here. So you obviously haven't experienced where you give someone a clean-cut, simple answer and they manage to have trouble with it. There's nothing "bulky" about my response. Yea, if you're including several js files that are huge then it'd be bad, but when it comes to basic js, performance isnt even a nanosecond slower than your code. And if he wants to do further calcuation or comparison of the input, you really think it's better(and cleaner) to put it all within the quotes after the event handler(onchange)? How about no. Plus, your code doesn't do what he asks. He asks for the textbox to update as input is typed. Your example gives the change after leaving the current input field. The correct one would be onkeyup instead of onchange
  16. yes, that is correct. All basic operators(==, >, <, !=, etc) are usable in mysql. Actually, thats slightly wrong, because mysql uses "=" to compare, not "=="
  17. Yes, this will need javascript. Basically have a function that you can call and when input is made(onkeypress or whatever), you call the function with the current input field's properties, and then to your comparisons or whatever. Then, say, if your textarea you want updated has a name="txt" in a form name="form1", then you'd do document.form1.txt.value='value goes here'; that's the gist of it
  18. How about posting your site in "website critique" and the guys here will test for all popular methods of security vulnerability
  19. uhhhhhhhh... are we supposed to mind read what the problem is?
  20. uhhhhhhhhhhhhhhhhhhhhhhhhhhhhh... what exactly are you expecting? You didn't comment your code at all so how can we know what you're even trying to do?
  21. add onclick="this.form.submit()" to the input tag
  22. Just create 2 temporary variables, like $hi and $low. and whatever the middle value is(the value between the +/-5) add or subtract 5 frm it and put it in its respective variable(for example, if you want 40, $low would get 40 - 5 = 35). Then just do a "SELECT FROM table WHERE column > '$low' AND column < '$hi' " thats pretty much it
  23. don't use css hacks. If you do, you're only putting a patch on the problem. And when new browsers come out that are different from their earlier versions, it could go all screwy.
  24. Anything with eric meyer will teach you amazing things. Whether his video tutorial, books, or online blogs/website. That will get you in the right direction
  25. ^ point taken. Just not a practice I see very much at all.
×
×
  • 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.