Jump to content

mybluehair

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by mybluehair

  1. I am trying to make a javascript code were when the user clicks a botton, it adds to the amount $myamount here is what I have so far, but it completely dosn't work. (im new to javascript)
  2. ok, i have a membership system. one of the feilds in the 'users' table in mysql is called rank. it has 2 posibilities. 1 or 2. 1 means ur a regular member. 2 means your an admin. so in the admin panel, i want to make a part were you can change the rank on a certain user. i was thinking about maybe a html form kinda, where you enter there username, then php searches for it in mysql. when it finds the desired row, it will display there ranking in a dropdown menu. you can change the ranking in this drop-down, and then click submit. then php would change the ranking in mysql. can someone show me the basic sql commands and php to do this?
  3. that dosnt work. here is the new php code: i get "sorry, u did not confirm"
  4. so i have a html file, and then a php file. the html file simply has a submit button on it, and is told to go to the php file when clicked. the php file has a 'if' statement that dosnt work. im trying to get it to say "if the user pressed the submit button, then do this" i dont know how. here are my codes. html: php:
  5. so i have made my website into 2 frames. in one fram there is a link to the admin panel. well i want it to be when you click this link, it will exit out of the frames and go to the admin panel. the code that i tryed is: "<A HREF=\"logout.php\" TARGET=MAIN>admin</A>" but that will open up in a new window. please help.
  6. so im creating something new with alot of php files, and i remembered that alot of times on message boards and things like that you see like "misc.php?action=list" or something like that. i would really like to decrese the amount of files i have for this new thing im creating. can someone show me how to put multi files in one?
  7. i figure it would be pretty easy to make a private message system seeing as i already have a member system but i want to make a feature were useres can enter in a message and send it to a certain person. when that certain person gets the PM, if they have not read it, there should be a little thing at the top that sayes "you have a new PM" i was thinking that it would consist of maybe 3 pages. a file for the html form, then a file to insert that into mysql, and then i bit at the top of every page checking to see if you have a new PM. oh, and then ofcourse a file for the intened person to veiw the message grabed from mysql. so can someone help me along? my users are stored in a mysql table called users, and the feilds of that (in order) are: id, Username, Password, Name, Email, Date, IP, Actkey, Activated, rank
  8. short and sweet. in my php file i want to show the time. (preferably time and date) how do i write it? i tryed something like this: "$time= NOW();" and that failed horribly. so please help.
  9. ok, im creating a chatroom using only php and mysql. ive gotten pretty far, and now i am running into a problem. i have gotten to the point were there is a member system. they have to be loged in to chat. well when they register it creates a new mysql row in a table called users. the feilds in this table are (in order) : id, Username, Password, Name, Email, Date, IP, Actkey, Activated, rank as you see at the end "rank". there are only 2 different things that can be. 1 or 2. 1 means your just a regular member. 2 means your a admin. now my problem is i need a php code that will grab that info if your a 1 or a 2. and then i need to make a if statement like maybe: so i need a way to do this and i dont know how. can someone please help me?
  10. can someone give me a php code to a captcha verification system, or maybe a link to a place that can teach me how to make one. i need to put it into my site
  11. thanks that worked. just 1 more thing. if i wanted to make the username a different color, and also add a little ":" after the user name, how would i do that inside $message
  12. sorry, it didnt work. now, when i enter something into the message form, and click submit, it displayes it as "1" new code:
  13. its weird...or maybe not, but when i say mysql outloud, i say "my squirrel". do you do something like that or do u just say "m-y-s-q-l"?
  14. ok, so im making a chat room using only php and mysql, and all on one page, theres a message form, and a insert into DB code (for whatever they entered in message form) and a display code, to display all the messages. and so i just added a member feature. and whats suppose to happen is $message is suppose to equal first what your username is, then what you entered into the messge form, so when i display it, it will look like "andrew32: hi mom" so heres my little code for that: now i have tried that plenty of other ways, all with the outcome of a mysql error. this is the only one that dosnt create a mysql error. but it dosnt regonize the message, only there username. so how do i write this out so that it will do what i want it to. here is my full code if you need it:
  15. ok, so what im doing is making sort of a php and mysql thing were theres a form, and people enter there name, email and phone # and click enter, and it goes to another php file and saves there info on my mysql DB. well, i thought it would be cool to have a javascript form on my site insteed of just a regular html one. so i got some java code, and made a form (well, i didnt make it. just downloaded something). but whenever i click submit, it dosnt go anywere like to my php page. now i dont know much about java at all, and it might acually be submitting the info to that php page, but its not clearing the form. would you take a look at my JS script and see whats wrong?
  16. well y didnt u just use phpadmin in the first place?
  17. sure. let me know if that works. not sure if i wrote out that query right or not.
  18. ok. heres what to do. start a php file. here are the codes: and that should do it.
  19. see accually im not that stupid. that was only a snipet of the code. but i still need help. here is my new code: and error:
  20. im making a login file, and it sayes "welcome to $name chatroom". well, at setup, a admin creates a table in mysql called settings. (threw a php file ofcourse) in this table, there are 3 feilds. in order: "password chatroomname websiteaddress" well so apparently i want to make a mysql query in login.php to grab whatever is in "chatroomname". here is what i tryed: but i just get a mysql error. so how would i write that?
  21. take a look at this: dont pay attention to all the mysql crap, but pay attention to the echo code. $one = "one and all" as you can see up on the top, but when i veiw this page here is EXACTLY what i see: what did i do wrong?
  22. ok, what should i search for exactly on google?
×
×
  • 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.