mybluehair Posted November 10, 2007 Share Posted November 10, 2007 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: <? $database = "*************"; $username = "**********"; $password = "*********"; $message=$_POST['message']; echo ' <center><a href="logintoap.html">Admin panel</a></center><br> <form action="allinone.php" method="post"> <br> chat message:<br> <textarea rows="12" cols="65" name="message" id="message"></textarea> <br><br> <input type="submit"><br>'; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die ( "unable to connect"); if ($message == '') { $message = false; } else { $query = "INSERT INTO contacts VALUES ('', '$message', NOW())"; } mysql_query($query); mysql_close(); echo '<hr>'; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die ( "unable to connect"); $query="SELECT * FROM `contacts` ORDER by 'datetime' DESC "; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); echo "<b><center>chats:</center></b><br><br><br>"; $i=0; while ($i < $num) { $message=mysql_result($result,$i,"message"); echo "<b>$message</b><br><hr><br>"; $i++; } ?> so how would i make this work? please help Quote Link to comment Share on other sites More sharing options...
AndyB Posted November 10, 2007 Share Posted November 10, 2007 phpMyAdmin uses html frames. Quote Link to comment Share on other sites More sharing options...
mybluehair Posted November 10, 2007 Author Share Posted November 10, 2007 phpMyAdmin uses html frames. ok, so how would i do that with this and keep it working? Quote Link to comment Share on other sites More sharing options...
AndyB Posted November 10, 2007 Share Posted November 10, 2007 phpMyAdmin uses html frames. ok, so how would i do that with this and keep it working? Start by finding a simple tutorial on frames. This is nothing to do with php and everything to do with simple html. Free advice: don't post 3Mb images as examples of things. People on dial-up don't like it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.