Jump to content

moose-en-a-gant

Members
  • Posts

    164
  • Joined

  • Last visited

Everything posted by moose-en-a-gant

  1. I have a follow up question, if an uploads folder only has webcam upload eg. a photo directly from a webcam, is it safe to use a permission like 777 or should I stick with 766? What about a folder where photos are uploaded from anywhere except the webcam?
  2. I tried both of these articles, I have a windows 8.1 tablet and both of the different "codes" worked but I tried my friend's iPhone and the camera viewport is just a black square or doesn't show at all... the problem seems to be that the pop up where you push "allow" or "deny" doesn't show up at all, this makes me think the trigger isn't "triggered". These are the sites I'm using HTML5 and Javascript, didn't do much modifcation yet, I just needed the basic web cam access, cropping, saving functions at the moment. http://davidwalsh.name/browser-camera http://mycodingtricks.com/javascript/webcam-api/
  3. hello Ch0cu3r Thanks for your response. Does the same problem of quotes apply for prepared? I mean is it $stmt = $link->prepare("UPDATE User SET hash=? WHERE email=? AND username=?"); $stmt->bind_param("sss",$hash,$email,$username); if($stmt->execute()) ... Or do the question marks also get single quotes around them ? This is an update with prepared query I currently have on one website that functions properly $stmt=$link->prepare("UPDATE Repairs SET expedited=expedited+1 where repco=?"); $stmt->bind_param('i',$_SESSION["value"]); I have problems knowing the difference between single quotes and double quotes RTFM haha someone said I'm also concerned about the variable $stmt being used more than once as well as the $link, I was helped to set up a dbcon.php file which has the login information for a sql database and this is "required once" when you use required once, can it be called more than once? I mean once you declare a $link = new mysqli... can that be used over and over again? See I didn't think so, so I did it twice, declare two different $stmts eg. $stmt and $stmt2 and $link, $link2... not sure if that is unnecessary Thanks for the help
  4. Tips via bitcoin? haha what like 0.00000 something? Anyway, yeah the AJAX vs. Javascript was a dumb question, what is it asynchornous javascript something is what AJAX stands for. Thanks for your time and response.
  5. I've used this update statement before, even with parameter binding, something easy is off... I'm trying to update a hash knowing a person's user name and email combination, this is not ideal I realize or safe. I actually generate a unique random hash per person who registers, I tell them to remember this eg. keep the email. I don't know why the update statement is being bypassed. So they enter username, email associated with username, new password. New password is hashed, replaces old one, redirect. I've been echoing stuff just to see the flow of the code, what is being executed and what isn't. if(empty($errors)){ $userrname = test_input($_POST['userrname']); $email = test_input($_POST['email']); $newpassword = test_input($_POST['newpassword']); $hash = password_hash($newpassword, PASSWORD_BCRYPT, array("cost" => 9)); $stmt = $link->prepare("SELECT username,hash FROM User where username=? And email=?"); $stmt->bind_param("ss",$userrname,$email); if($stmt->execute()) { $stmt->bind_result($username_from_db,$hash_from_db); if($stmt->fetch()){ $_SESSION['user']=$username_from_db; $query = "UPDATE User SET hash=$hash WHERE email=$email And username=$username_from_db"; if($result=$link->query($query)){ $_SESSION['status_message'] = "Password has been reset"; } }else { echo "no good"; } $host = $_SERVER['HTTP_HOST']; $uri = $_SERVER['REQUEST_URI']; // the path/file?query string of the page header("Location: newlocation.com"); exit; $link->close(); }
  6. Thanks for the inputs guys Hopefully your home under the tree is well Mr. Fox haha
  7. Don't some people have javascript disabled? Curious the pros and cons of ajax vs. javascript About the IE6, not sure, I suppose most people are running 11 or higher
  8. I'm starting to learn Ajax today and I came across this: Old versions of Internet Explorer (IE5 and IE6) uses an ActiveX Object: variable=new ActiveXObject("Microsoft.XMLHTTP"); Do I need to bother? Or should I have an if else statement that tells based on which browser is detected, what httprequest to use? Ahh... spoke too soon var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } Still, does it matter?
  9. Yeah I know one of those questions Like you guys are lawyers on standby or something. I just wanted to discuss the idea of creating a website mock up for a business that exists but you researched and they don't have a website yet. I guess how, is the next question in terms of getting their prices of products... but mainly what I was going to do was following along Google Map's street view and screenshot their business logos which are visible to the public eye. Then create a mock up of a website to show them on a tablet. What do you guys think?
  10. interactJS is what it is called? Thanks for that tip. "use Google to host it"
  11. Thanks for your responses, I'm going to try a simple 3 step approach that incorporates different techniques to see if a person can put their website together with releative ease... it will be interesting to create script or something that automatically creates/points a database, the key is being intuitive. Drag and drop is must as well as positioning. Anyway I'll get something together.
  12. These are the specs that come to mind, CPU, RAM, Storage, Bandwith My question is this, once you know what the point of a website is, whether it is to host videos, design something with an editor, ecommerce, if I ask a costumer "How many people do you expect to be on your site?" Is that a fair question? Or is that arbitrary or even rhetorical like "Duh... the maximum count" I want to know based on what is being accessed whether it is the photos displayed on page, character count, flash / javascript, whatever... how can I estimate? This is for assigning VPS's depending on the clients requirement
  13. hehe yeah seems like an ambiguous question It's just that, do they know how the web works, how things are stored, SEO... stuff like that It's like they just "expect it to exist" which fine, as a businessman / developer that is your job... but how would you handle prospective clients of any experience... Well I guess that's up to me to find out
  14. I'm a developer, I don t know how to think like the consumer? What do they know? What do they want? It s hard in a way to explain something complex in layman s terms, I mean yes it is easy, you take files, put them on the internet, others can view them. Fine. But when they want a website, what should I expect? I mean, it seems like I can t ask them to even "draw a design on paper" for me to translate into a website which I prefer. Wireframes are nice, like drag and drop, I m looking to build one of those with automatic database creation/ pointing with injection protection. Anyway, it does depend on what their business is about, I think their mission statement or goal as a business is what determines the functionality and presentation of the website. If you want a website, what do you want? What are you looking for?
  15. I am looking to use this functionality : http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_collapsible However using my own CSS style. I looked at the source code, unfortunately the code is just jammed together so it isn't immediately clear how it works, I thought too that I could find every semi-colon and do a line escape but I don't know / think that javascript / jquery follows the same end of line statement as php. I'm just looking to have a rectangle that when pushed, another rectangle of the same width but different color / font "extends" below this one, pushing the other elements below, away. If anyone would care to chime in I'd appreciate it, otherwise I'll scrutinize the javascript/jquery code, I haven't worked with either too much yet. Thanks
  16. Hmm... that sucks I'll have to look into each scenario I have a VPS at the moment but ideally I would have a dedicated server Was that following the sentence prior or are you saying this is the normal solution? I think the key thing for me to figure out is how to update components of a webpage without refreshing the page... I think this sounds like javascript eg. getElementId I thought about a "if one user hits post, refresh all of the connected-user's webpages" hahaha sounds bad
  17. I'm working on a chat using basic textarea input, post, but the problem that I'm facing is, if a person doesn't send something, then the output is not updated eg. other messages from other users updating in real time. How is that achieved when you see new database entries pop up live, milliseconds after they are entered? Do I set a constant refresh rate of some sort? How do you update a section of a webpage without "refreshing" the entire page like the POST method?
  18. I'm going to ask a question that I may solve later today. I want to trigger the file upload by a photo rather than the stock browse button / submit button... which results from <input type="file"... I think I know how to do this, I've been taught how to use different post steps depending on the value eg. $action I just don't want the browse button nor the submit button to show... I may have to settle with a pop up window or something... otherwise hide the buttons somehow, once the pop-up or file manager has occured, then a button appears to submit after seeing which photo was selected. I'm not sure how I will display a photo in a text area, I may need to come up with a new 'canvas' that supports different things eg. text, embedded video, image
  19. Yes, I looked at that, I have the loggin out working. As I said I haven't worked on the mobile aspect yet, there are problems with instantiation of sessions... It is kind of dumb but I have different interface designs for each browser, mainly because of how I have created the interfaces by floating them to the left, unfortunately depending on what browser renders the page, the borders cause "overflows" or are too wide. Anyway, between bouncing from index to browser-index, then to the interface... It's not bad per se, I just have to get everything straightened out
  20. I'm not sure I haven't finished the mobile section, I just spent half a day creating the new interface which may be useless for mobile phones just because of space... anyway, I will get back to this again very soon eg. later today when I wake up. I will look at this post with more detail.
  21. Thank you for this, code blindness I suppose on my end
  22. I received an error about parameters expecting 0 for session_destroy(); I passed $_SESSION['user'] in session_unset(); testing now with a friend I have a peculiar problem A is Index, B is userpanel, C is stock-interface A to B to C, session is kept eg. username However going from C to B loses the session value... wonder why that is? Going back is a link to the url of B Further, if I'm in C and I type in the primary url or index of the site eg. A, the session is kept, not sure what is going on with the back link using <a href> This also happens with my lazy reset, where it is a link to the same page, will need to check some stuff Yeah I don't understand this it is so weird, I can open up a secondary tab and I am redirected to the userpanel eg. session value is kept but it's like this "blank url" redirect where if it didn't come from a page which previously had a session, there is no session... but that doesn't make sense following the sequence I've described above.
  23. Here's a question does this remove all session values eg. how do I specify only a specific user? session_unset(); session_destroy();
  24. Did I suggest that? That is not my intent, I just want it to work ha. It was peculiar how my windows phone would log in properly but my friend's android phone would not eg. redirected to the logged out screen. I'm going to get things built, I've got a lot to do. Thank you guys for your time really, I appreciate it
×
×
  • 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.