Jump to content

requinix

Administrators
  • Posts

    15,065
  • Joined

  • Last visited

  • Days Won

    414

Everything posted by requinix

  1. You need to make sure that you don't run the command if there was an error. Right now you set $error if a is bad, but as long as c is valid you'll execute the command. The code structure I prefer for this kind of thing goes like this: errors = array() if a is not valid { add error message for a } if c is not valid { add error message for c } if no errors { do stuff }
  2. Unless you trust the HTML to be reasonably valid, it'd probably a good idea to run it through something like Tidy first. Just in case.
  3. Variables do not work in single-quoted strings. Use double-quoted strings or string concatenation. But first your code is really, really unsafe. You may think the amount will be a certain thing (a number, I assume) but the code doesn't do anything to make sure that's the case. Someone could use a=whatever command I want in hereand have you execute aumix -v whatever command I want in hereIf amount is supposed to be a number then make sure it's an actual number: cast it like $amount = (int)$_GET['a'];and then make sure it's a valid number, like amount>0 and amount
  4. No. The only way to avoid putting the port in the URL is if you can run something on port 80, which is the opposite of what you're trying to do.
  5. The W3C has gone through great lengths to explain, in detail, exactly how processes like this work. HTML 5 Form Submission tl;dr: When submitting a form, 1. Browser does everything up to the actual navigation/request as normal 2. Uses the target to figure out where the request should be made 3. Makes the request (and handles the response, and so on) within that target It's not "print within that target" or "load the response in that target". When the browser is ready to submit the form - that is to navigate, with or without a request body - it does so in that tab/window/frame.
  6. No. Once you provide the URL you stop being involved. Right. Yes.
  7. There is no php54-mysqld. Do you mean mysqli or mysqlnd? And you're saying sudo yum install php54-mbstring php54-whateverthatpackageisdoesn't work? What error messages are you getting?
  8. The result from functions like file_exists() are cached for the duration of your script, if not longer. When the shell_exec() ends the files should be fully deleted. Use clearstatcache to clear the cache before you verify that.
  9. getElementById() is what your next step will be, but as its name says it gets you an element - not an HTML string. Get the element, then pass it to $dom's saveHTML to get the HTML string.
  10. What you have there isn't actually working: $windowwidth contains the Javascript code you wrote. It wasn't evaluated. Your script is simply outputting Window width is: <script> var wwidth = screen.width; document.write(wwidth): //output </script>If the PHP must have the width then you must push the user through some other page before then. No way around it.
  11. Now that you've announced your index99.html, you should take it down. I can see your code. And database credentials. Right. Blank page every time. Normally a blank page is the result of a parse error; as it so happens, line 199 is missing a semicolon and the if block on line 229 is unfinished. You should be getting error messages about this, and if not right on the page (a bad idea in production) then in some error logs. You also need to learn about SQL injection. It's a bad thing and you're vulnerable to it.
  12. What's in your index.php? Not happening for me.
  13. Make sure you put the file in the right place and that Apache can read it. Also make sure you've installed any dependencies there may be.
  14. You can still use those lines but you can't put them in the .htaccess. Try the virtualhost config instead; if you have multiple sites and more than one needs it, in the global config.
  15. With the same mechanism you used to put the make into the table: echo it. ">Which is a guess, since the code you've posted doesn't quite match up with the description you gave.
  16. You could just alter the execution time: figure out how long a single image should take and multiply that by the number of images (then add a bit more just in case), change the time limit accordingly, and do your work. Processing multiple images at once will be a bit faster than each one individually, though I wouldn't expect there to be that huge of a difference.
  17. Have you looked at the server error logs yet?
  18. Well, you know how to get the make, and you know how to put things into URLs, so... do that. The next page uses $_GET to get the make and runs a query with it. How about giving that a shot? If you have problems, post your code and explain what's going wrong.
  19. Why not just change the form to use method=get?
  20. Windows-1252 does not have those characters. Whatever you may be doing with conversions, going to or from Windows-1252 will not work.
  21. That's not (supposed to be) a problem that you simply find-and-replace your way around. It's being inserted by something, odds are your browser, because you've given it characters to display that aren't valid for the character set you told it to use. Where are you seeing that and what code and/or database do you have behind the scenes powering it?
  22. "unfollow="+unfollow+"follower="+follower+"&action=unfollow"Missing a &
  23. The problem is how you're fetching the data in your code. You can't use an associative array, like $row["description"], because the row has multiple columns named "trans_ref" and "description". You could use another fetch method that lets you refer to each value by column number, which sucks because then you have to keep track of what column has what values, or you can use aliases in your query: SELECT table1.trans_ref AS table1_trans_ref, table1.description AS table1_description, table1.date_paid AS table1_date_paid, table1.recurring AS table1_recurring, table1.amt AS table1_amt, table1.bill_code AS table1_bill_code, table2.trans_ref AS table2_trans_ref, table2.description AS table2_description, table2.amt_deposited AS table2_amt_deposited, table2.deposit_date AS table2_deposit_date FROM table1 RIGHT JOIN table2 ON table1.username = table2.username(named all the columns with "tableN_" for consistency) And I think you should be using a LEFT JOIN, if either at all. Ask yourself what you want to happen (a) if there are rows in table1 with no matching rows in table2, and (b) if there are rows in table2 with no matching rows in table1. How you answer determines whether it's LEFT, RIGHT, or INNER JOIN.
  24. Make that link go through a PHP script as well. waitfile.php can handle it too. I figure you can have the same URL as before but with an added value in the query string indicating it's the "click here" link, and you log those requests a little differently.
  25. At this point you should be thinking "Undefined method? You mean that mysqli_stmt does not have a 'bind' method? I wonder what methods it does have..." and then heading over to the documentation.
×
×
  • 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.