Jump to content

moose-en-a-gant

Members
  • Posts

    164
  • Joined

  • Last visited

Everything posted by moose-en-a-gant

  1. Here's my thought: A person buys data, they have a quota, I'm talking about cellular networks. In any area, a tower or provider is more prevalent / stronger than others. What if, a person could install an app that allowed them to broadcast / be as a hotspot while getting paid per kb "sold". Technically I am not breaking the law am I? I mean that person 'paid' for that data. What is the difference between selling it to someone for money on their behalf (and mine) as opposed to wasting it on useless activities like browsing social media sites... ? It would be an app that has both parties, "searching" and "transmitting". What is "illegal" about this? Aside from obvious problems like security
  2. Okay thank you. I think your initial respons is what I am after.
  3. What about target? I just used a paypal button and I saw this : <form target="paypal" action=" " method="post">
  4. I think I understand that there can only be one "submit" button on a page. I want buttons for separate forms to not trigger the empty errors on the other forms... How do you accomplish specific button actions? I think I've tried it with javascript but you can do it with PHP right? Thanks for any help.
  5. I would like to have database entries or rows, be outputted into "panels" with independent x's on them to delete an entry. I think I've got the update / delete stuff figured out, what I don't know is how to hold down an entry and drag it up / down with the other's reacting and then this reorders them eg. updates database ID numbers. Any thoughts?
  6. I read on the manual, there was a "Warning" about using /tmp so I figured a person who was so inclined could look up /tmp folder path. I don't know if that is true eg. if it is in the same folder as public_html I am having a weird problem. My friend was testing my website for me and he can't keep his session, so he is automatically redirected to a "you've been logged out" page. When I hand him my phone, he loggs in, he stays in... I have a windows phone and he has like an S5 or something. It's odd because both of our phones are independent of the server that has the files on it... so why does my phone work and not his? I haven't made the changes yet of the folder path. And is that dumb to keep setting the session value on each page so that they are "carried over" to the next page?
  7. Oh man this is great thank you, I like that password length check, I was concerned about using varchar(255), I mean I had read about 2*128 or something so 256 I figured was the standard for storing when using SHA255 or something. I think that it is unused space then. Specifying a larger length isn't a waste is it? Is that allocating spare space that is "taken" by empty spaces? When you say configuration file, do you mean a stand alone php file that I include at the top of a registration page / login page?
  8. Did I? What I posted above is what I use. I use password verify, I use this: if (password_verify($passsword, $hash_from_db)) { $_SESSION["user"]=$userrname; function Redirect($url, $permanent = false) { { if (headers_sent() === false) { header('Location: ' . $url, true, ($permanent === true) ? 301 : 302); } exit(); } Redirect(' userpanel ', false); } So if I use that for verification, and this for hashing, am I safe? $hash = password_hash($passsword, PASSWORD_BCRYPT, array("cost" => 9));
  9. I don't know if my password encrytion has been done correctly / is actually secure. I don't have anything valuable at the moment that people would care to hack, but in the future I want to be absolutely certain I am doing it right. This is my process, I am storing it as Varchar(255), did a cost test and 9 was my result $hash = password_hash($passsword, PASSWORD_BCRYPT, array("cost"=>9)); I was told I don't need a salt since it is included in the password_hash function Also I noticed most of the hashes if not all start like this, why is that? $2y$09$ Thanks for any help
  10. I built a website that has multiple users accessing it at once, there is a problem with the sessions. People are getting directed to a logged out page. I know why this is because I don't thoroughly understand how to use sessions. I have picked up about storing in places other than /tmp , I'm concerned about storage and not carrying it from one page to the next So when a person logs in, then they hit back on their browser or exit it (for a phone) and go back to it, they should still be logged in. That doesn't happen, they are usually logged out. Also there is a weird anomaly. When I use the website on my device (phone) I don't have a problem of session value getting lost and the website exists on a server / computer that is not this phone, so why does my friend have problems with sessions but not me? This is my general session code, it is garbage <?php ob_start(); session_start(); if( !isset($_SESSION['last_access']) || (time() - $_SESSION['last_access']) > 60 ) $_SESSION['last_access'] = time(); session_save_path('/home/admin2/public_html/sesh'); ini_set('session.gc_probability', 1); $userrname = $_SESSION["user"]; $_SESSOIN["user"]=$userrname; if (empty($userrname)){ header("Location: "); } ?> I'd appreciate any help. Thank you.
  11. Wow, thank you so much. It finally works. The problem as it turns out is the keyphrase parameter, I requested to search "all" so the keyphrase was set or expected to be "all" not anything else. <- this means that I'm just returning every entry by a user and so keyphrase is not needed aside from determining that the input was "all" as defined in the control statements. Anyway thank you very much this simple output helps me a lot.
  12. I know it works because it outputs, here is a basic file and yes "pure" as in no front end, it's just a script executing. I will enter these three strings with the keyword php, "Test 1", "Test 2", "Test 3". Then, ideally if the code works, (what I need help with now) I would enter php in the keyphrase field, and hit search, then in the search results field, all of the rows with php as a keyphrase would be displayed. This is the interface I used to enter that data this is a photo, not a website / ads http://parsemebro.com/interface.png Search does not work... that's why I am here however I will provide the userrname / keyphrase directly rather than getting it from a POST <- problem? So, when I enter this link into a browser http://parsemebro.com/tent.php This is the output 01-07-2015 Test 3 01-07-2015 Test 2 01-07-2015 Test 1 This, is exactly what I want to happen on this page, in the text field with the placeholder "paste here or view search results" http://parsemebro.com/interface.png The buttons are not different, so technically you can push pmb to search, I haven't learned that yet, I just built some control statements based on what is entered eg. what is empty, what is not, to take in the single control (POST) which might as well be one button. Here is the code for the tent.php file Notice the function, I was going to try and include the file then call this as a function like password_hash() which I have to use a library extension eg. include <?php session_start(); function list_result(){ $userrname = "moose"; $keyphrase = "php"; function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } $servername = " "; $username = " "; $password = " "; $dbname = " "; $link = new mysqli("$servername", "$username", "$password", "$dbname"); $stmt=$link->prepare('SELECT stratoparse,date FROM stock WHERE user=? AND keyphrase=? ORDER BY ID DESC'); $stmt->bind_param('ss',$userrname,$keyphrase); $stmt->execute(); $stmt->store_result(); $num_rows = $stmt->num_rows; $stratoparse=null; $date=null; $stmt->bind_result($stratoparse,$date); $rows2 = array(); $rows3 = array(); while($stmt->fetch()){ $rows2[] = $stratoparse; $rows3[] = $date; } $search = array(); for($i=0;$i<=$num_rows;$i++){ echo $rows3[$i].' '.$rows2[$i].'<br>'.'<br>'; } } echo list_result(); ?>
  13. Hello, this is my first post here. I am trying to output the rows of a certain query in sequence after a POST has been requested. I have been successful in getting the output in a pure php file but when I try to implement this in a web page with html/css, I can't echo the array in arbitrary locations after the post has processed. This is the code which outputs successfully in a pure php file, but I need it to work in a <textarea> field as the results of a search $rows2 = array(); $rows3 = array(); while($stmt->fetch()){ $rows2[] = $stratoparse; $rows3[] = $date; } $search = array(); for($i=0;$i<=$num_rows;$i++){ echo $rows3[$i].' '.$rows2[$i].'<br>'.'<br>'; } } To further iterate what I am asking. When errors are stored, you write something like $errors['username']="A username is required."; Then in any location of a webpage I can call this or show it, provided by this <?php isset($errors['username']) ? $errors['username']:" ");?> That is the same thing I am trying to do with this array which can be an arbitrary count of rows... I have not been successful in getting this to work... I have been told of string concatenation... I don't know what to do Thank you for any help
×
×
  • 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.