Jump to content

Rohlan

Members
  • Posts

    48
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Rohlan's Achievements

Member

Member (2/5)

0

Reputation

  1. I have to question the usage of keyboard navigation on websites. Unless we're talking google or a very basic website layout I really don't see how navigation is anything but a harduous task. Removing the dotted border will most probably have no effect at all in accessibility from your users. I would however only remove dotted borders from specific elements other than all of them. A list of links is probably a bad idea to do without the d.border, but from a logo or for certain other situations i'm pretty sure its feasible. If keyboard navigation was such an issue, we wouldn't be able to use onclick or other js perks.
  2. oh, we posted almost at the same time, hehe thank you very much for the help
  3. ... obviously was drawing a COMPLETE BLANK. I was forgetting the GROUP BY. Here's my query ... SELECT type, COUNT(*) AS Types FROM data_table WHERE type IS NOT NULL GROUP BY type
  4. Hello all. I'm having a difficult time figuring out this query, I even think I've done it once before but can't seem to remember what I did. This is my data: +--+----------+ |ID | type | +--+----------+ | 1 | type_1 | | 2 | type_2 | | 3 | type_2 | | 4 | type_1 | | 5 | type_1 | +--+----------+ I simply need to get the results in this fashion: Types | Quantity type_1 | 3 type_2 | 2 Why am I not figuring this out? seems so simple.. Any help is appreciated.
  5. if javascript isnt enabled, the user has no access to the page already this is an internal application, not to be released to the public
  6. When the user logs out I can also clear the user's pages, that just leaves the bit when the user abruptly closes the window, or shuts down the browser.
  7. Hello everyone. I'm working with vTiger CRM 5.2.0, I'm trying to implement a feature that tells the user what if other (and which) users are on the same page as them, this will allow me to warn users that someone else is editing the same data as them and such. My first untested theory is to use the database to store what pages which user is viewing. What I can't figure out is how to remove the page from the table once the user leaves. I can run a query when the user saves the data or hits the cancel button, but what if they simply close the browser window or exits the system through some other means? Logging out, or even shutting down the computer abruptly or some such. Any suggestions are appreciated
  8. I edited my post as I was making little sense in some bits. But I will try your tip! thanks.. Edited: It works! Thanks! i didnt know that function... i guess i shouldve searched a bit better.. hehe...
  9. Hello. I have an array like this: Array ( [1] => MOR [2] => CON [3] => CP1 [4] => CP2 [5] => EMAIL [6] => NIF [7] => BI [8] => DIS ) And then I defined, for example this one variable: define("DIS","District"); When I try to... echo $array[8]; All I get is "DIS". I'm obviously trying to echo a string and it won't work that way... but I still gave it a try. How can I do this then? I need "District" to be outputted instead of the actual variable name. I know that if I were to "echo DIS;" this would work but that defeats the purpose as I have various defined variables per row... Thanks.
  10. It's just kind of ugly, and servers little purpose... i think
  11. Never knew this was possible, I'm also interested in knowing.
  12. Your code should look more like this: (didn't proof read it) //SERVER 1 $link = mysql_connect("localhost","usern1","pw1"); mysql_select_db("db_one1"); $query = "INSERT INTO db1(subject, search, News, img) VALUES('$hsubject','$key','$news','$img')"; $result = mysql_query($query); //SERVER 2 $link = mysql_connect("xxx.xxx.xx.xxx","usern2","pw2"); mysql_select_db("db_one2"); $query = "INSERT INTO db2(subject, search, News, img) VALUES('$hsubject','$key','$news','$img')"; $result = mysql_query($query); $sentOk = "The data has been added to the database."; echo "sentOk=" . $sentOk; Because you rewrite the $link variable on the second connection... This way you connect to the first db then send the info... then connect to second db and send info.
  13. I recently ran into something similar. I found this SQL Command: INSERT IGNORE INTO `table` SET `ID` = $user_id,`IP` = $user_ip; Basically it will insert the value unless it is already there, and if it IS there... it will simply ignore it and no errors will be outputed. A life saver... More info here: http://bogdan.org.ua/2007/10/18/mysql-insert-if-not-exists-syntax.html
  14. I will begin by letting you know of a great place to start your learning experience: http://www.tizag.com/phpT/ I still keep coming back to that website to learn stuff. Now... you should place the PHP files in the "WWW" folder in your apache installation... either that or a folder called "PUBLIC"
  15. Hi everyone. first, TL;DR: What are some good examples of applications that you found especially well-written or what would you recommend me to read to get a good feel of what a secure and robust looks like? Long boring version: I'll start by noting that all and any coding that I know has been self-taught by reading tutorials and endless trial-and-error experiences and thusly I am afraid I might have drifted a bit away from what the community understands as "normalization" and "proper" coding. That being said, in a crude way one could say I have "my own" way of doing things. Because of that I often run into a more efficient way to achieve something, or someone looks at my code and thoroughly explains to me it might need optimization and tweaking. I didn't attend college and many terms are also new to me, I've worked as a freelance programmer for a little more than 5 years now and I've been doing so-so. I sort of want to step away from that now, I'd like to get in touch with what is considered a secure normalized way of programming. I know this might sound like I've gone too far for too long but that isn't really the case. I just feel like my coding is a bit dodgy sometimes and that someone else that might be interested in my projects might go "wtf" and turn a cold back on it due to it looking like a mangled confusing wall of code. With that in mind... I have been working on this web application I've been calling "taskgrammer", the name comes from "Task Programmer". What it did at first was allow someone to create tasks. That was it. But it grew. Right now there's a Contacts and Customers center with CRM-like functions, Task types, User management, Robust scheduling, Payment management, Team management (currently working on internal human resources system for salaries, holidays, etc) Alerts system... with many functions that allows any small company that provides any kind of service to manage their whole activities and get reports on finances with detailed per-customer debt reports and profit margins and what-have-you. Due to my "type" of programming, I've left some things behind that need optimizing, be it cleaning some code or making sure that the application is functioning the way I want instead of leaving things "working fine so I'll leave it", rushing things always feels wrong and I tend to do it when I'm having a crap day (lol) or just need to do something real quick... but then I can't help but feel worried that that's not what I wanted to have done and it needs future "healing". I hate that feeling of helplessness when you're not sure that bit of code should be left like that... as it might interfere with future plans or it might actually re-define your work-flow without you ever planning to do so. The main thing that worries me in this application is the security aspect. It runs on the web and is prone to attacks and ill-intended shenanigans. So I went ahead and devised some amateur security "systems" (that's what I call them in my mind), one of them is for preventing direct access to include files and other files, I make a check for a defined variable on the config file, if the check is true then the file can be accessed, this means that you have no way of accessing any of the files without going through proper routes, but is that really true? Is it really safe? I have my doubts because I don't really know what tools folks can use to hack into things and break everything. Pure lack of information. My config file is a bit big, it has a lot of includes for all my functions and that is another thing that worries me, I have around 10 function library files ( i decided to divide them into various files just for easier editing ), I am loading those functions each time even if they are not necessary... is that OK? is there an influence in my application's performance? Everything seems speedy to me so that makes me believe its ok to do that... but is it taxing my server's resources? ... lack of information again, I suppose. Then there is my "template" system where I have each page in a function like contact_list(), that function simply calls the template file contact_list.php and in certain cases might provide some needed parameters. What I do then is I call each function in GET variables like index.php?action=contact_list and then have this in my main template file: $_GET["action"](); I could probably come up with some other way of doing these things nowadays that I'm a bit more knowledgeable but I don't want to have to rewrite everything so soon as I've put a lot of work into this already. I've already said a mouthful and I'm thankful that you read it, so ... what are some good examples of applications that you found especially well-written or what would you recommend me to read to get a good feel of what a secure and robust looks like? Thanks, and hugs for everyone.
×
×
  • 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.