Jump to content

Destramic

Members
  • Posts

    969
  • Joined

  • Last visited

Everything posted by Destramic

  1. im not sure what the best think is to do for what i need? would this work? users ------------------ user_id clan_id username password email icon access 'clan', 'admin' -------------------- and if access = admin then i would leave clan_id blank? can someone give me some id on how this should work?
  2. is there a away i can join both users and admin table and check both tables for a certian user and pass?
  3. but i also want to store information about clan that admin users wont need...?
  4. would i be able to join both tables and select a user ? is that possible?
  5. I’m making a website where there will be an administration panel if having access as an admin and a clan login which will have different options and access’. I want to make an auth in OOP but I’m trying to find the best way of doing it? Both admin and clan users will be created in different tables to make it easier… Eg: Admin table ------------- Administration_id Username Password Email ------------- Users table User_id Clan_id (which will link me to their profile) Username Password What will be the best way of doing this with oop? Ricky
  6. hey im just wondering how to get the session id within the url? example: index.php?session_id=456n45l6j7567l67j5675j7 ... i could simply do it this way but im sure there is a simpler way.. <?php $session_id = session_id(); echo "<a href=/"index.php?session_id=".session_id."/" title=/"Home/">Home</a>"; thanks Ricky
  7. im selecting rows from my database but i want to put it into group/category displaying into a drop down list <select></select> so everything begining with the letter C in one category having a label at the top etc.. C - counter-stike : source c&c 3 D- Delta Forece 2 ... Ricky
  8. sorry...lol i mean, everytime a <div> tag is used i seems to use a <br> straight afterwards....any way of stoping this?
  9. is there anyway of not having a page break automatically with a <div> tag? thanks ricky
  10. so im not able to reset the field?
  11. define("FILE_UPLOAD_TYPES", array('image/gif')); i want to have this variable as a array so i can basically check when people upload if that certain file type is permitted. [code] if (!in_array('image/gif', FILE_UPLOAD_TYPES)) {     echo "file not allowed"; } [/code] but it doesnt seem to work...are you not able to sore array's in a define varable? thanks ricky
  12. i made this script to rest field...so even if a field vaule = "something!" then it will still reset it..but it doesnt work for type = "file" anyone help? [code] <script> function reset_form(the_form) { if (confirm("Are you sure you want to reset this form?\n Note: All entered data will be lost in the process.")) { var elements = the_form.elements; for (var i = 0; i < elements.length; i++) { var element = elements[i]; var type    = element.type; if (type && element.value !== null) { switch (type) { case "select-one": element.selectedIndex = -1; break; case "text": case "textarea": case "password": case "file": element.value = ""; break; } } } } } </script> <input id="file_upload" name="file_upload" type="file" class="file" value="" /> [/code]
  13. thank you very much :D
  14. well i have a table called 'games' ------------------ game_id name icon (will be saved as /images/icons/"game_id".gif) ----------------- so i need to get the next autoindex of the game before it has been inserted so i can insert the icon uri...? thanks ricky
  15. thanks mate that great
  16. nope that wouldnt work...would just be like using [code] mysql_num_rows() + 1; [/code] basically if there has been 10 entries to the database and you've deleted the 2 recent entries, then mysql_num_rows would return 8 which infact i would need it to return the next index which would be 11. hope someone can help ? thanks ricky
  17. easy question...i have just a general button...when it is clicked i want it to to a certian uri eg. google.com maybe a onclick function? i cant fingure it out. [code] <input type="button" class="button" id="preview_button" name="preview_button" value="Preview" title="Preview" /> [/code] thanks ricky
  18. just wondering how i could get the next Autoindex of a table? thanks ricky
  19. basically for all operating systems..just to check that the file they have selected from <input type=file />  is accually a dir...hope this helps...should i use dirname?
  20. just to regex a dir path
  21. wondring if someone could help me regex a dir in general: eg:  D:\www\images\read.gif thanks destramic
  22. yea i need to get a value from a form input field and use it in another window...can you help?
  23. i have button that opens a new window...in that window is a form...when submitted i want the open window to close...but im wondering how do i get the values from that open window of a input field into my webpage? i know this can be done... thanks ricky
  24. bit of weird questions 1. but when selecting rows from the database, other than using the primary key(id number) is there anyway of getting the row number? like mysql_insert_id; in a way but to get the number while your fetching the rows..? 2. is there a mysql function that has the array of the columns you wish to fetch..ie: [code] $query          = "SELECT news_id,                           author,                           DATE_FORMAT(date, '%d/%m/%y %r ') AS date,                           status                     FROM news                     ORDER BY news_id ASC                     LIMIT ".$from.", ".$limit.""; [code] and to have a function that calls back array('news_id', 'author', 'date', 'status') but only the selected columns and not the whole lot from the table. hope someone can help thanks..[/code][/code]
  25. good idea...thanks
×
×
  • 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.