Jump to content

Darnel

Members
  • Posts

    17
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Darnel's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the advice, ill know in the future
  2. Thanks Jessica, I didn't know about mysql restricted keywords. Its working now.
  3. Yes it is, but I changed count to show and removed quotes as suggested but nothing happened.
  4. Thanks, Iv'e changed the name and removed quotes. But still getting error. $sql3= " UPDATE ".PROJECT_TO ." SET to_user =" ."CONCAT_WS(',','".$post['name']."', to_user)," ." show = show +1 " ." WHERE project_to_id = ".$project_id." "; This line causes the error (...syntax to use near 'show = show +1 WHERE project_to_id = 2' at line 1)) ." show = show +1 " What am I missing?
  5. Database error: Invalid SQL: UPDATE project_to_user SET to_user =CONCAT_WS(',','demo1', to_user), count = 'count +1' WHERE project_to_id = '1 ' MySQL Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'count = 'count +1' WHERE project_to_id = '1 '' at line 1) Session halted.
  6. Hi, I've been trying to find the syntax error with no luck. Keep getting error 1064. I'm not used to this format so not sure what goes where. Its driving me crazy :'( can any one point me in the right direction? $sql3= " UPDATE ".PROJECT_TO ." SET to_user =" ."CONCAT_WS(',','".$post['name']."', to_user)," ." count = 'count +1' " ." WHERE project_to_id = '".$project_id." '"; Thanks :-\
  7. Hi, I have this code but would like to modify it to be able to insert a new data in the next field if the current one is not empty. global $db; $sql= " UPDATE ".Project ." SET " ." name_1 = '".$user_id."' " ." WHERE project_id = '".$project_id." '"; $db->query($sql); So for example if field "name_1" is occupied I would like to add the same $user_id to "name_2". I've been trying to use CASE WHEN name_1 = '0' but can't seem to get the syntax right and keep getting Mysql errors. Any help appreciated, thanks
  8. Darnel

    Paypal API

    Hi, really need some advice on Paypal API. I'm not sure which API to use. All I need is for Paypal to take payments from a users owed money wallet (a field in a Mysql table) preferably every month or so. Also the user would need to sign a agreement for this? Any help is appreciated. Thanks
  9. Hi, I have a page that uses jquery to load content (different content appears after clicking link). It was working fine but now after clicking the link it loads for about 30-40 seconds, but still loads every time. I've been using Firebug on Firefox but it shows (200 OK 32.95s) and no errors. Has anyone ever had something like this happen? any ideas what it might be or how I can test it? All other pages load normal its just this one. Thanks
  10. Hi, I have a weather script from google but I'm having some trouble figuring out how to set the language to display special characters such as ū,ė and so on. This code sets the language to my desired one. function __construct() { $this->lang = lt; // sets the language I also have this code So the rest of the website displays normal. Is there some PHP code I can use in the script? to set it to utf-8? or something? Thanks
  11. Yes the website is live I bought it from someone else... I updated everything so all new users will be alright. As for the old users they will not be able to log in until they reset their password using the forgot password link. I guess I got F***** . Lesson learned and experience gained in the process. Thanks for your help clearing this mess I really appreciate it.
  12. Ah I found the problem since for some reason I have two registration forms and in one the $salt was missing so now I have a database with some salted and some not salted passwords. Is there a way to update all my password fields in mysql?
  13. If I understand right all the passwords are salt'ed in my database. The problem is when a user resets their password they can no longer log if there is no $salt. And if I do have $salt then the normal users can't log in. sorry i'm new at this
  14. Hi, I'm having some problems with this code. I have a password reset utility code which works and encrypts the password with md5 by using the password recovery page. But in order for a user with a reset password to login I have to use this code in my page. $username = addslashes($_POST['username']); $salt = 'random_stuff_15545'; $password = md5($_POST['password'].$salt); But when I have this code above the users that have NOT reset their passwords can NOT log in. So for these users who have not reset their password i use this code[but with this code the users that reset their pass cannot log in]: $username = addslashes($_POST['username']); $password = md5($_POST['password']); How can I allow both types of users to log in? Cheers
  15. Yes, I now have a form that send a message when i specify $to = "withsome@email.com"; Form <form id="formail" action="" method ="post"> <label>Name : </label> <input type="text" name="name" id="name" /> <label>Your mail :</label> <input type="text" name="mail" id="mail" /> <label>Subject : </label> <input type="text" name="subject" id="subject" /> <label>Text :</label> <textarea name="text" id="text" cols="40″ rows="10″></textarea> <input type="submit" value="send mail" id="sendmail" name="sendmail" /> </form> Php code <?php $mail = $_POST['mail']; $name = $_POST['name']; $subject = $_POST['subject']; $text = $_POST['text']; $to = "withsome@email.com"; $message =" You received a mail from ".$mail; $message .=" Text of the message : ".$text; if(mail($to, $subject,$message)){ echo "mail successfully sent"; } else{ echo "Error mail not sent"; } ?> Now all i'm trying to do is to set $to = "withsome@email.com"; to something like $to = $myrow['email']; So that the recipient would be a specified email address from the database. I know i'm making this harder than it is Cheers!
×
×
  • 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.