Jump to content

dannyb785

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by dannyb785

  1. Ok, so maybe not hack... but tell me what vulnerabilities there are. This is a client's website and it is entirely database driven so I would say it's successful if a visitor wouldn't have any way of modifying anything from the database. http://www.xausf.com
  2. Even if it does work, users are accustomed to seeing radio buttons and only checking one. If it works, it just means you added them completely wrong. Plus, try unchecking them as radio buttons
  3. no. enum allows you to setup the column so only specified value can go into it. If you want 0 and 1 to be the only values allowed, then you'd do ( '0', '1' ). It has nothing to do with 0 false values and 1 true. You need to think about why you are making the column enumerated. Is it required that the column only be one of a few different choices? If not, just make it a varchar or an int
  4. on your submit button, you have onclick=wstxSubmitForm(this) but I dopnt see the wstxSubmitForm() anywhere on the page nor did I find any included .js files that had it in them. Also, for current medications, you have "check all that apply" but you have radio buttons... so a user can only check one at any given time... you need to change them to checkboxes.
  5. I believe the enum values need to be in single quotes. So: 1 becomes '1' and if there are more than one, separate by a comma. And for INT, you dont need to specify a length
  6. When I said x=y, it meant any possible conditional that would specify which rows get updated. Like "WHERE user_id = 5" or "WHERE user_fname='Bob' " or whatever. But if you leave out the WHERE part, it will update every single row with the stuff after SET
  7. lol dude, when I said "WHERE fname LIKE '%mike%' " I meant to add that to the end of the "SELECT * FROM table" statement.
  8. "UPDATE User SET user_level=3" that will update every single row's user_level to 3. if you want to hone the update a little more, end the query with "WHERE x=y"
  9. Thank you for not following the rules. I guarantee you could google it and find a million answers
  10. will you post the query you're using and the results you're getting?
  11. that won't work.. okay current image is 5 i have 10 images (from 1 to 10) using the above selects next would be 6 BUT prevous would be 1. as i suggested before do some reseach on pagination, here some info http://www.tonymarston.net/php-mysql/pagination.html you could also search this forum.. when it comes to $rows_per_page just use 1 My bad, for the 'previous' link, you'd need to order by image_id DESC. Then it'd be fine. good to know you didn't even acknowledge my help.
  12. Ok, I'm using the column names that you provided, here's what you should do SELECT *, (rating / (todays_date - dateJoined) ) AS sort_info FROM 'table' ORDER BY sort_info DESC or make DESC into ASC if that corrects the order By doing the math with the columns and putting AS, you create a new column that is based on the function provided. And then you'd just sort by that new column.
  13. it's not bad, just probably uses more processing memory than needed. bc if one image is id #2 and the next is id#30, you have to check 28 images before you find one. Even though computers are pretty fast, kimagine if you have a few hundred(or thousand) users doing it at the same time. Not efficient! An easy method you could do would be for the previous image, SELECT * FROM Image WHERE image_id < '$current_image_id' LIMIT 1 for the the next image, SELECT * FROM Image WHERE image_id > '$current_image_id' LIMIT 1 where $current_image_id is the image currently being viewed(if that wasn't obvious).
  14. Must not have searched hard enough. I found this in about 10 seconds. under the html section: http://www.phpfreaks.com/forums/index.php/topic,205805.0.html
  15. What value are you trying to sort? Joindate? Or the value that is the difference between joindate and now? Whether it's either, just do ORDER BY joindate and then DESC if you want the most recent joined or ASC of you want the ones whove been the longest.
  16. php code can only be processed in a file with the .php extension
  17. lol there are so many of these threads. Nobody ever reads the rules that say search before posting
  18. I don't use apache. And i've never had problems adding a new domain to my server.(then again, i use shared hosting, so that may be different)
  19. did you type that query yourself or did you use phpmyadmin? edit: remember, you need to just ADD a column quote_id, not modify a current column. And you have to make it a data type of int, not varcharr
  20. duuuuuude that's it. editL that's a perfect example of why, when I create a table, I name my rows according to the table's name. i.e. if my table name is downloads, I start ALL my column names with "dl_" or "d_" or something simialr. That way I never run a risk of naming a column after a keyword. Plus it's easier for me to identify which variables go to which values. I suggest you do the same.
  21. go to the site that you registered your domain at and change the nameservers(dns) to your server's nameserver. Then you should be able to change a setting in your domain where you can "add domain" and in there, you'd specifiy the domain, and then create an ftp user, and then it'd create a folder in your main directory with where that new website's files would be located
×
×
  • 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.