dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: iBeZi

Page 1 of 9 1 2 3 4

Search: Search took 0.02 seconds; generated 27 minute(s) ago.

  1. Thread: MYSQL Error

    by iBeZi
    Replies
    28
    Views
    567

    Yeah the quote definitely shouldn't be there. ...

    Yeah the quote definitely shouldn't be there.

    Are you sure your table and column names are all correct in the query, and are the $nickname2, $email and $userid variables all set correctly?
  2. Thread: MYSQL Error

    by iBeZi
    Replies
    28
    Views
    567

    Kind of hard to tell what's going on with that...

    Kind of hard to tell what's going on with that random [color] tag in your code, but it looks like you might have a stray quote after id=:userid?
  3. Thread: MYSQL Error

    by iBeZi
    Replies
    28
    Views
    567

    :nickname is a placeholder for the variable your...

    :nickname is a placeholder for the variable your setting the "nickname" column to, you're replacing it with the value of $nickname when the query executes.

    You shouldn't put quotes around your...
  4. Replies
    15
    Views
    657

    md5 the password before passing it to "execute"?

    md5 the password before passing it to "execute"?
  5. Thread: MYSQL Error

    by iBeZi
    Replies
    28
    Views
    567

    Try saving the query string in a variable and...

    Try saving the query string in a variable and echoing it out so you can see what's being executed.



    $queryStr = "UPDATE users SET nickname='$nickname2', email='$email' WHERE id = $userid";...
  6. Replies
    15
    Views
    657

    Read through your code, where is $result coming...

    Read through your code, where is $result coming from? That should be probably be $row. If you're still using md5 then you probably also need to md5 the password before passing it into the execute...
  7. Thread: MYSQL Error

    by iBeZi
    Replies
    28
    Views
    567

    You need to add a column to compare the user id...

    You need to add a column to compare the user id against



    $query = mysqli_query($conn, "UPDATE users SET nickname='$nickname2', email='$email' WHERE id = $userid");
  8. Replies
    15
    Views
    657

    Yeah people should be using strong passwords as...

    Yeah people should be using strong passwords as you say but it's highly unlikely that most of your average users would go to the effort of thinking of a password as complicated as that, let alone...
  9. Replies
    15
    Views
    657

    I'm not saying that using md5 is bad per say as...

    I'm not saying that using md5 is bad per say as long as you are using a salt, I'm just saying that bcrypt is better. bcrypt lets you use a completely random salt for every password, you don't need to...
  10. Replies
    15
    Views
    657

    There are a few different methods of hashing...

    There are a few different methods of hashing strings in PHP, md5 is just one of them. However it isn't the best method for a few reasons, for one thing every time you hash a string with md5 the hash...
  11. Replies
    15
    Views
    657

    mysqli_real_escape_string apparently also expects...

    mysqli_real_escape_string apparently also expects the link to the database returned by mysqli_connect() as it's first parameter, then the string to escape as the second parameter.

    Honestly, if...
  12. Replies
    6
    Views
    577

    Your inputs are named 'x' and 'y' but you're...

    Your inputs are named 'x' and 'y' but you're using 'number1' and 'number2' to get the values from the $_POST array.
  13. Replies
    2
    Views
    423

    Try this value=...

    Try this



    value= value.replace(/[^0-9.]+/,"");
  14. Replies
    27
    Views
    1,056

    No problem glad you found the problem. Just so...

    No problem glad you found the problem. Just so you know what the issue actually was, you were using "intval" which converts the value into an integer, integers can only be whole numbers so it was...
  15. Replies
    27
    Views
    1,056

    Chances are that part of the script isn't being...

    Chances are that part of the script isn't being executed then, so that query isn't even touched. The actual insert query must be somewhere else.
  16. Replies
    27
    Views
    1,056

    When you put "die;" in your script, did the...

    When you put "die;" in your script, did the entire page render? As in could you see the form and everything? It kind of sounds like that part of the script isn't running at all...
  17. Replies
    27
    Views
    1,056

    Put it back where you had it originally and...

    Put it back where you had it originally and change it to var_dump, then die afterwards



    $sql = "INSERT INTO bs_coupons (title,dateFrom,dateTo,type,value,services,code)
    VALUES ('" . $title ....
  18. Replies
    27
    Views
    1,056

    Try echoing out the query so you can see what's...

    Try echoing out the query so you can see what's actually being executed



    $sql = "INSERT INTO bs_coupons (title,dateFrom,dateTo,type,value,services,code)
    VALUES ('" . $title . "','" ....
  19. Replies
    27
    Views
    1,056

    Looks about right to me, give it a go

    Looks about right to me, give it a go
  20. Replies
    27
    Views
    1,056

    Why are you concatenating $value onto the round()...

    Why are you concatenating $value onto the round() result? "$value . round(153.751,2)" should just be "round($value,2)"
  21. Replies
    27
    Views
    1,056

    Looking at your code I can't see where $amount is...

    Looking at your code I can't see where $amount is coming from, you don't seem to be defining that variable anywhere, are you supposed to be using $value there instead?



    $sql = "INSERT INTO...
  22. Replies
    27
    Views
    1,056

    $number = 33.336; //round down...

    $number = 33.336;

    //round down
    floor($number); //33

    //round up
    ceil($number); //34

    //round to 2 decimal places
    round($number,2); //33.34
  23. !-d means not a directory !-f means not a file

    !-d means not a directory

    !-f means not a file
  24. Replies
    3
    Views
    477

    "this" refers to the object instance, you can use...

    "this" refers to the object instance, you can use that to access or edit properties belonging to the object instance. Methods and properties assigned using "this" can be considered public properties...
  25. Replies
    8
    Views
    911

    There might be a case where you want to do...

    There might be a case where you want to do something when you access or modify a property, for example you might have an object that stores a record of all the previous values of a property.


    ...
Results 1 to 25 of 201
Page 1 of 9 1 2 3 4
HTML5 Development Center



Recent Articles