Jump to content

dannyb785

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by dannyb785

  1. dannyb785

    css help

    First off, what is the reason for putting a left wrapper? You've got the 3 column thing going on, and thats fine, but they're 3 separate entities, all floated. So you don't need to group 2 of them since they're floated left. The real thing to do is float them all left and then order them as they appear. For example: if you have the left column in the middle and it's floated left, it will align to the left of anything that isn't already floated to the left. But that's where it makes it confusing since div a can be typed after div b, but if it div a is floated to the left(and div b isn't), then div a will show up before div b. Anyways, look at the new code I posted: <div class="wrapper"> <div id="header"> TEST HEADER </div> <div class="col1"> <p> </p> <p> </p> left side <p> </p> <p> </p> </div> <div class="content"> <p> </p> <p> </p> content <p> </p> <p> </p> </div> <div class="col2"> <p> </p> <p> </p> right side <p> </p> <p> </p> </div> <div id="footer"> TEST FOOTER </div> </div>
  2. The error is on the line that shows echo '<select name='hosta' id='hosta'> you need to either replace the single quotes around hosta with double quotes, or escape the single quotes with a backslash. By putting single quotes, you're basically ending the string at "=", putting some text that the compiler can't understand('hosta') then starting the string back again but with no echo, and then repeating. Backslashes are the key to having quotes within echo statements(and others)
  3. can you give an example? Your question wasn't entirely clear. What are you looking to do?
  4. I think the token system is just a way of encrypting the time that the form is displayed, so it uses the concept I brought up, just presented in a slightly different way. Which makes sense bc I think I've sent messages quickly on myspace and they make me enter a captcha, probably to verify that I'm not spam. I would be interested, though, to research what things happen as a user browses a page, as opposed to what all(or most) bots do and how the behavior differs in terms of length on page, actions taken, links clicked, forms submitted, data entered, etc
  5. Thank you barand. Like I said, with LIMIT a,n you are starting with the nth row(in whichever order may be specified). Not the row with id n.
  6. You raise a good point(about blocking non-js users) though I would like to assume(hopefully correctly) that all or most bots have js set to be able to interact with(like, a bot is able to do an onclick event or whatever), so I could possibly assume that if the user doesnt have js enabled(by doing an easy test), then the submission would go thru(since the assumption would be that if js isn't enabled, that it's a real person). Would that be wrong to assume?
  7. I believe they are both correct. Putting a variable in between curly braces is as if you ended the quote, truncated with dots, and then continued the quote afterwards. so it's be equivalent to <?php echo "<title>".$rows['db_names']."</title>"; ?>
  8. Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\www\hearder.php on line 2 problem again You need to learn a few basics about outputting variables to the screen. First off, when you are in between <?php and ?>, the only thing printed as html is that which is echo'd. Secondly, You have to end any and every line with a semicolon. Example: echo "hello world!"; Thirdly, if you are using double quotes for your echo, using an array with a string as an index cannot be in a single quote. Example: echo "$row[variable]"; not echo "$row['variable']"; Fourthly, if you are using single quotes, the only way to display a variable is to temporarily end the quote, truncate the variables with periods(.'s) and then startthe quote again. Example: echo 'The value '.$variable.' has been set into a variable'; not echo 'The value $variable has been set into a variable'; So in summary. If you want some variable between title tags, you can do it a few different ways: either: <?php echo "<title>$variable</title>"; ?> or <title><?php echo $variable; ?> </title> and ther are other slight variations, but those are the main 2.
  9. using "Limit a,b" is mainly for pagination(that is, if you have too much to display on one page, you make page numbers and each page # is calculated and the proper value placed in front of the comma). You're getting (a) number of records starting from the (b)th record. So in your example, you're getting the first 7 rows, starting with the 3rd row.
  10. Are you familiar with using SELECT from mysql to grab a row from your database, and then how to successfully output it? If not, I'd suggest reading some tutorials.
  11. I was also thinking something along the lines of an event handled with onclick. Can a bot "click", therefore setting the onclick event? like, once the click is physically made, a value is set, and then on the processing page, check to see if the value is set. Something like that?
  12. Ok, so when a user visits a site with a form, with say, 5 fields. Obviously it takes a certain amount of time to fill out the form(even with autocomplete, give atleast a few seconds per field) so after a user first views a page with 5 fields, it would probably take a minimu of about 10 seconds to fill it out, right(let's say yes for the sake of argument)? Now, conversely, when a spam bot fills out a form to post its spam, how long does it take to fill out? I really don't know, nor have I done any tests, but perhaps someone knows. Because if it's one of those instantaneous things(or something that only takes a second or 2 for 5 fields), would you say that they probably will out the forms rapidly(since they really don't care what form they're filling out, they just fill out whatever they need). So, with the thought that spam bots fill out forms rapidly(faster than any normal user), could we put a hidden variable that is the exact second the form is displayed, and then, on submit, the current date would be recorded and if the difference is say, less than 5 seconds(or less than 2 seconds per field, perhaps), would it be safe to reasonably assume that it's spam? Does this theory have any merit? EDIT: ok so i just realized this thread doesn't relate to captcha's, but you still get the idea
  13. I'm gonna say that you need to strip away all code except the mail() function. just have <?php mail() ?> and that be it. And put the literal strings in the mail function. So do <?php if(mail("testuser@whatevermail.com", "Test email", "This is a test", "lvincent@ci.durham.nh.us")) echo "Email sent"; ?> this is assuming that the domain you're sending the email from is nh.us. And replace testuser with your email(or an email you have access to) If this doesn't work, then you have server issues with the mail function
  14. Did you even look at my post? 99% of the time, it is because the mail function is sending with the header saying "From: someone@someotherdomain.com" And your function does just that.
  15. @fenway, This is a perfect example of why we needed the code. The error message he was receiving wasn't related to his query. Ok so kof200012, you have a few issues. Here's the first 2 I noticed: First, regarding your error message, you need to examine the line where it happens. value="<?=$_POST['primeiro_nome'];?> I think it may be bc some servers don't allow for just the <? to open php code. I also think it might be because there's no space between the ; and the ?>, but I could be wrong there. I also don't use that syntax to output a variable, but I think you may not need to have the semicolon. My suggestion: I always just do "<?php echo $variable; ?>" it's just a little bit bigger, but it ensures that it will do what is expected, rather than using shorthand which may or may not work. As for your query $sql = @mysql_query ("INSERT INTO membros (primeiro_nome, ultimo_nome, email, bio, username, password) VALUES ('$_POST[primeiro_nome]', '$_POST[ultimo_nome]', '$_POST[email]', '$_POST[bio]', '$_POST[username]', '".md5($_POST[password])."') "); When you use single quotes, everything is outputted literally. So variables don't work. You're gonna nee to replace the single quotes bwtween each $_POST with double quotes. You also are doing this the worst way possible. You NEED to escape and filter your data. If a form has so much as an apostrophe, you will get an error, but even worse, if they put malicious code, you're screwed.
  16. Please stop asking people to post their code -- we don't need to see their ENTIRE code! Just a single query. his query probably[hopefully] is structured correctly. The issue is probably with how he has manipulated the variables, and not added slashes and such. Just seeing the query itself wont help much
  17. I think either a) this is a joke. or b) you need to read about the basics of a php/mysql query. You're missing some key functions in order to interact successfully with a database
  18. sorry, edit the thing i created
  19. I added a link <a href='javascript:alert(document.cookie);'>Click here</a> and when I clicked it, it gave me all sorts of neat information. With that knowledge, a hacker could do all sorts of mean things. Filter out javascript in links(and for that matter, in all posted data). Also, is there a way to edit my post?
  20. Do you have any idea what SELECT COUNT(*) FROM even does?
  21. Please mark the topic as SOLVED by looking at the top/bottom of the page for the button that indicates solved
  22. I find it funny when people give us the error message and expect us to know what the error is in their code... without giving us the code! dude... please give your code.
  23. So let me see if I can even understand what you want... You want to have a calendar displayed, and then have a dropdown list in each day with the users listed in the dropdown. And you want to be able to select whichever user for whichever day and then be able to save all the users for each day?
×
×
  • 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.