Jump to content

MoZo1

Members
  • Posts

    10
  • Joined

  • Last visited

MoZo1's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. MoZo1

    Bug with explorer

    Me stupid. I don't have the value, but I have the button's name with '_x'. Then isset-type check.
  2. I agree, it's a weird HTML. It can cause a lot of error in every browser, but to find out, wich one you need to fix, use Firefox's DOM inspector from the Tools tab, or with Ctrl+Shift+I.
  3. MoZo1

    Forms question

    1 more thing: with mysql_real_escape_string() and strip_tags() you can use that characters (and even the ' character) safely. They're unnecessary with this check (because the allowed characters can't be used for attack), but still recommended as double check.
  4. MoZo1

    switch problem

    You should copy your entire code here, cause the switch is good, and with the $_GET array, it should run on every PHP versions.Oh, and you can try it with else if, I doubt it will work.
  5. Try DISTINCT instead of UNIQUE! Some sql servers don't like UNIQUE while Oracle uses each.
  6. MoZo1

    Learning PHP & MYSQL

    This site can give some more:http://www.tizag.com/sqlTutorial/And anyway, use Google, it can help when nothing else can!
  7. MoZo1

    Bug with explorer

    Wow, thanks anyway, I've learned something new, but the submit image still have name and value, and it's still not working. Or rather, it works under firefox, but not under IE. But now I assume, that if it's not trash data, then the IE just directly don't send that. Thanks anyway!
  8. MoZo1

    Bug with explorer

    Grr, I'll answer 10 noob question, if you help me, how to fix this! :)Ok, I can work without multiple buttons, but not the same, and now JS is not allowed as requirement.
  9. 1. Use addslashes and stripslashes in pairs, so if you have stored something with slashes, you have to get back the original form. So again: convert the data into a storeable format, then don't forget to reverse the convertion when reading it! Fx. you get can't by input, then you can only store can\'t, but then you have to give back can't as output.2. Check the corresponding SQL syntax.fx.: INSERT INTO employees (Lastname, Firstname, Title) VALUES('Hively', 'Jessica', NULL); 3. This: function sql($txt, $db) //sql with error handling, $db=sql-connection { $result = mysql_query($txt, $db) or die ('Mysql error: ' . mysql_error() . '<br /> Original line: ' . $txt); return $result; } I haven't tested it, it should be correct. *EDIT: mysql_real_escape_string is a variation of addslashes, usually you can use it with stripslashes. The same bug can occur, but with very rare characters only. But beware it in the sql's LIKE command!!
  10. MoZo1

    Bug with explorer

    I have a form with a lot of image type submit buttons, and one drop-down list. The drop down list's name is amount, and the submit "images" have the same name, task2 (without _x and _y) with diferent values. Then in the debug section, when the program terminated because of illegal parameters, I use "print_r($_POST);", and watch this: Array ( [task] => box_move [amount] => 1 [task2_x] => 14 [task2_y] => 10 )Array ( [task] => box_move [amount] => 1 [task2_x] => 8 [task2_y] => 6 ) Array ( [task] => box_move [amount] => 1 [task2_x] => 10 [task2_y] => 8 ) Each line I've got, by clicking the browser's backward button, then the same button again! I've found some forum articles on the net, telling that others have the same problem even without the same button name (fx. 1 code used isset-type check). The most embrasing, that the same code always works fine with Firefox, but not with Explorer and Conquerror.I have an idea, that I should set something in PHP or in explorer, that modify the posting method, but idk how. Anybody have an idea, or same problem, or anything? Thanks for any help!
×
×
  • Create New...