Jump to content

Mudsaf

Members
  • Content Count

    462
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mudsaf

  1. Have you tried this <?php$currentFile = $_SERVER["PHP_SELF"];$parts = Explode('/', $currentFile);$currentpage = $parts[count($parts) - 1];if ($currentpage == "webshop.php") {//Display script here}?>
  2. Anyway you could display your full code for both files uploading & form?
  3. Have you tried this? <table border="1" width="100%"> <!-- Example 100% width, border is for visibility reasons you can remove. --> <tr> <td width="50%" style="text-align:left;"> <!-- Aligns text left (Prob not needed by default) --> <div style="background-color:#CCC; display:inline-blcok;">Div 1</div> <!-- Background set for display reasons, remove if want. --> </td> <td width="50%" style="text-align:center;"> <!-- Centers the div element inside --> <div style="backgrou
  4. Hello, i'm wondering is there script that could remove embed object when its finished the sound?
  5. Depends what kind of logo you're looking for.
  6. Yea id="page_nav" should not have position absolute.
  7. Aaah i got it now, thx, but is there any other pasting method than printf()? Got this solved aswell, thx for help.
  8. Hello, i'm wondering how to make same method at MySQLi prepared what was in MySQL (code below). $query = "SELECT * FROM data";$result = mysql_query($query);while ($row = mysql_fetch_array($result)) {echo $row['MyData'];} I've tried this so far. $query_gls = "<select query>"; //You wont need to know thisif ($stmt = $con->prepare($query_gls)) {$stmt->bind_param("s", <My post variable>); //You wont need to know the post variable either.$stmt->execute();if($stmt->fetch()) {/* Im lost at this part */} else {die("MySQLi Failure");}}
  9. Well ill try to keep it at minimum, thanks for info. With 2x process i can track if user login logout. I have actually 10x10x10 (1000) options i could make with combinations on one page. Example Process 2 0 = Visit1 = Login2 = Logout3 = Form post success4 = Form post failure5 = MySQL error //Other than connection//.. and so on, ofc i have page data + user ip + other stuff up also.
  10. So basically i should do my logging with example TinyINT maxlength 3? ColumnsID (INT, AI, PRIMARY) | PROCESS (TINYINT 3, NOT NULL) | PROCESS2 (TINYINT3, NOT NULL) | IP (VARCHAR 15)1 | 1 | 1 | 127.0.0.1//Example ID, <page>, <what happened there>, <ip-address>
  11. Hello, i'm wondering do you guys log user data what they do. New user registerations Logins & Logouts Page visits and other kind of form post information that the user does. Example I tried to make logging system & having over 70000 logs there (98% prob page refreshes). Also what mehod? .txt file or SQL-table?
  12. Alright, thanks for info, I've used it all the time but wasn't sure should i
  13. Hello, i'm wondering which way you recommend to use news text. Subject & Text columns are seperatedly on MySQL database or everything in one Column at NewsText?
  14. Well i'm wondering what is method in MySQLi to check if user exists in database like in MySQL it was below. $result = mysql_query("SELECT * FROM accounts WHERE username = '$username' AND password = '$password'");$rows = mysql_num_rows($result);if ($rows == 1) {echo "User data found.";} The SQL query worked with data. SELECT * FROM ms_accounts WHERE userName = ? AND userPass = ? //This fixed my problemif($stmt->fetch()) {echo "SUCCESS";} else {echo "WRONG UNAME OR PW";}
  15. Year I'm sure those are correct data. $rows = $stmt->num_rows(); //Returned 0 aswell while data was correct @ Database.//Taste my code :/if ($stmt = $con->prepare("SELECT userName FROM ms_accounts WHERE userName = ? AND userPass = ?")) {$username = $_POST['username'];$password = md5($_POST['password']);$stmt->bind_param('ss', $username, $password);$stmt->execute();$stmt->fetch();$rows = $stmt->num_rows();if ($rows == 1) {printf ("%s, %s", $username, $password);echo $rows;} else {printf ("%s, %s", $username, $password);echo $rows;}} Getting no errors but rows = 0
  16. Well the code displays this. <noscript><iframe src="http://www.google.com/recaptcha/api/noscript?k=6Lc7VdASAAAAADcvby26Vavw4lw47jQwCHDU7EKv" height="300" width="500" frameborder="0"></iframe><br/> <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/></noscript Displays sometimes on page like that or messes up the charsets of finnish ä letter. (Attachment @ my last post)
  17. so does { } prevent SQL injection? Yeah those are false data added here where is <data>.
  18. Ah works but now i have google reCaptcha charset problem.
  19. Doesn't google reCaptcha work without JavaScript? I'll get message below. <iframe src="http://www.google.com/recaptcha/api/noscript?k=6Lc7VdASAAAAADcvby26Vavw4lw47jQwCHDU7EKv" height="300" width="500" frameborder="0"></iframe><br/> <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
  20. Blah its some bug, they disappeared for no reason now.
  21. if ($stmt = $con->prepare("SELECT <username> FROM <accounts> WHERE <username> = ? AND <password> = ?")) {$username = <username>;$password = <password>;$stmt->bind_param('ss', $username, $password);$stmt->execute();$stmt->fetch();$rows = mysqli_stmt_num_rows($stmt);if ($rows == 1) {printf ("%s, %s", $username, $password);echo $rows;} else {printf ("%s, %s", $username, $password);echo $rows;}} I tried to figure out how to see if the query rows match but at the moment $rows displays 0 even with correct data. So how i check if user have logged in wit
  22. Yes i've double clicked. I'm just wondering why it displays 15 empty warnings there.
  23. Well doesn't display any errors or warnings there.
  24. What you recommend, messy code or clean interface for non-JavaScript users?
×
×
  • Create New...