Jump to content

mybluehair

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by mybluehair

  1. i am making a chat room using only php and mysql. and i want it to be so you have to make a account (simple username and password account) to be able to access the chat room. except i dont know how. i need to make a registration page, and a login page. i can make the registration page were whatever they entered for the username and password will be put into my mysql DB, but thats really all i know how to do. can someone teach me? here is my chat room code:
  2. 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 ajax form on my site insteed of just a regular html one. so i got some ajax 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 ajax 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?
  3. ok, so how would i do that with this and keep it working?
  4. do you know myphpadmin? well ya know how theres a thing on the left side of the page that shows you your tables? and then beside that, theres everything else? well i kinda see that thows are 2 different pages both being viewed at the same time. the left panel never refreshes (unless needed to) to make things look a bit cooler. well, as some of you know, im making a chat room. and here is a pic of it: http://gotdrake.com/screen.bmp but anyway, it would be great if i could spit that in 2. right above were it sayes "chats:" would be a nice place to split. but thats not the only problem. when you click submit on that form, its told to go to the same exact page. (in that page it includes a bit were if anything was previously entered in the message box, it will insert it into the DB). so that might mess it up or something? idk, i dont really care how its done, just as long as it works. here is the code to the file: so how would i make this work? please help
  5. ill post how i did it... MySQL: somerow DATETIME NOT NULL and from your script you need something like that: $query = "INSERT INTO sometable (somerow) VALUES (NOW())"; ok. thank you. im almost there. here is my little code: as you can imagine, i have created a new field in contacts called "datetime" and i used the little "now" code thing you gave me. so i tested it out. when i enter in a message, and submit it, i go to myphpadmin and in browse i see my message i entered, and along with it, in the datetime feild, i see the time it was created. but only problem now, is when i change: to: all i get is a mysql error. maybe you could help me out. here is the bit in my file that works as showing entered messges: how would i change this, so it could use the datetime to order them correctly?
  6. ok, but what would $connect equal. and how does this help my problem?
  7. um...what? in my php code you mean? i have: @mysql_select_db($database) or die ( "unable to connect"); y?
  8. ok. um...how would i creat a field like that? (timestamp) how exactly would i get it to know what time a message was created? also when i enter your code i get error: Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/gotdrake/public_html/tutorial/allinone.php on line 40 line 40 is:
  9. ok, so im making a chat room using only php and mysql. here is my full code (this is one file called allinone.php): so hopfully u can imagnine what that looks like, and what it does. but for some reason, half the time, the code that displays the messages from my DB will order it wong. so lets yes you type in "hello" and click enter. the "hello" will appear on the bottom of the list of everything else sayed, intead of appearing of the top. can some one help me? how do i correct this?
×
×
  • 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.