-
Posts
902 -
Joined
-
Last visited
-
Days Won
9
Everything posted by doddsey_65
-
thanks for the repies. I added the switch but how would i do that for the last 2 where get equals something? i just left them last 2 as elseif statements in the emantime but nothing works. when get equals topic it stays on the same page. switch($_GET){ case 'topic': include 'modules/pages/posts.php'; break; case 'forum': include 'modules/pages/topics.php'; break; case 'parent': include 'modules/pages/parents.php'; break; } if (isset($_GET['do']) && $_GET['do'] == 'unanswered') { include 'modules/pages/unanswered.php'; } elseif (isset($_GET['do']) && $_GET['do'] == 'today') { include 'modules/pages/today.php'; } else { include 'modules/pages/forums.php'; }
-
the following is the contents of my index.php file if (isset($_GET['topic'])) { include 'modules/pages/posts.php'; } elseif (isset($_GET['forum'])) { include 'modules/pages/topics.php'; } elseif (isset($_GET['parent'])) { include 'modules/pages/parents.php'; } elseif (isset($_GET['do']) == 'unanswered') { include 'modules/pages/unanswered.php'; } elseif (isset($_GET['do']) == 'today') { include 'modules/pages/today.php'; } else { include 'modules/pages/forums.php'; } as you can see depending on what the get value is it loads a corrosponding page. however on the last 2 statements it loads the same page index.php?do=unanswered. why wont it load index.php?do=today when the $_GET value == today?
-
thanks for the reply but im still confused. so i will need more than one file to process this data?
-
okay so im new to ajax. Not to php or html though. What i want is a quick reply box like on most forums, but the quick reply will be sent to the server and the reply will be displayed in the posts section without having to refresh the page or go to another page. I heard ajax could do this. So any help? where should i look for tutorials on this? can someone maybe explain the process?
-
hi, i have the following which parses the quote tag and replaces it with a span $bb[] = "#\[quote\](.*?)\[/quote\]#si"; $html[] = "<span class='quote'>\\1</div>"; what i would like however is for the bbcode to be
-
okay i have fixed the xhtml errors and some of the css errors that i can fix. i have also set a default width so the screen size shouldnt matter now. but the scroll bar still pushes the content. it pushes everything not just the background. EDIT: fixed it with: overflow:scroll;
-
im no expert but try: $id = $_GET['id']; $query = mysql_query("SELECT * FROM bestillinger WHERE id = '".$id."' ") $row = mysql_fetch_array($query); $query= mysql_query("SELECT * FROM fakture WHERE kunde= '".$row['anmoder']."' AND betalt = '0' AND rykker = '3'"); $result = mysql_num_rows($query); if ($result >= 1) { echo' <div class="response-msg error ui-corner-all"> <span>Meddelelse</span> Denne kunde har i øjeblikket en eller flere ubetalte faktura på rykker 3 </div>'; }
-
well i think the problem is to do with the scroll bar. the site looks fine on pages that have it(ie pages where the content is greater than the screen height), but when the scroll bar isnt present it looks different. Did you have a look at the site to see what i mean?
-
i need help with my site. On the main page everything is fine, but when you click a topic and go to the next page the padding seems off. I dont know why this is because i have checked the code several times. if anyone can help please let me know. I will supply the css and php code to anyone who wants to try and fix it. Thanks EDIT: heres the url: http://thevault.cz.cc
-
I want to introduce you all to a new project im working on. Its a forum software package like phpbb where you can download the files and install your own customizable forum. I havent done much yet i have only added the basic of features and havent really bothered with the layout, but you can go there now and share ideas and your crits. Okay in order to help development i am going to list things that work, things that dont work and things that i know need improving. Therefore if you see an error or think something can be different you can see if i already know about it. Things that work: Post new Thread View Forums Login Register Post reply Style Switcher some bbcode email confirmation Dont work: Various navigation links Birthdays display Board Stats some bbcode Needs improving: templates security layout on all pages except index icons Still to come: Admin Centre User Centre PM System Search Function more templates bigger language support I will add more to this list when neccesary. http://thevault.cz.cc
-
thanks, another thing is i want to display the contents of another table but if the content has more than say 50 characters then i want to replace all remaining characters with three dots to signify a continuation. how would that be done?
-
hi, i want to select the 5 newest records from a table in the database. the date they were entered is in a column called post_time and this is a timestamp(000-00-00 00:00:00). how would i go about this?
-
ok i need directing to a tutorial, an easyish one that can help me do a secure login and registration system. Something that uses sessions and mysql. something with sql injection and other security. i need it very secure. hope you can help.
-
ok bare with me if this sounds stupid. How do i get it so that bbcode can be added within a textarea tag? im assuming it is a lot of str_replace. is there a tutorial on this somewhere?
-
Hi, ium trying to make a login page but i want features such as while a user is typing in their username a box to the side lets them know if its available in real time. The same with the password, it will display their password strength. Now i have no idea what to type into google to get tutorials on this so can some one tell me what to type into google? or perhaps point me in the right direction.
-
thanks for the reply. I feel more confident without doing it and i am sure i can create the whole thing without them. I just thought since this will be open source when its done that most people would see the code and think me some sort of noob with the way it is written. ive got a few tabs open atm with OOP tutorials so i will start reading them anyway.
-
im currently doing a large php project and i am confident i can do it. Its a basic forum like phpbb or mybb where users can download the files and instal. however i have looked through their code and i see they use classes. I have never learned to do classes since i havent had to use them yet. should i be using them now for this project? do i need to? and if so then what are the benefits?
-
thanks, works perfect.
-
I want a little online users list at the bottom of my page and the color of the username is to match the color defined in the database. but how do i get them to align side by side? if i add them to a <p> they will all appear under neath each other. Heres my current code: $sql=mysql_query("SELECT * FROM ".DB_PREFIX."members WHERE online = 1"); while ($row = mysql_fetch_object($sql)) { echo '<p style="color: #'.$row->username_color.';">'.$row->username.'</p>'; } also i want a comma at the end of each but how do i stop it adding a comma to the end of the last one?
-
sorry i fixed it, instead of $sql = "SELECT * FROM '".TBL_PARENTS."'" or die(mysql_error()); i used: $sql = "SELECT * FROM ".DB_PREFIX."parents" or die(mysql_error());
-
i have the following sql running on local but i get an error. the sql: $sql = "SELECT * FROM '".TBL_PARENTS."'" or die(mysql_error()); the config file: define('DB_PREFIX', 'forum_'); define('TBL_PARENTS', DB_PREFIX.'parents'); the error: 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 ''forum_parents'' at line 1 the echoed sql: SELECT * FROM 'forum_parents' as you can see when it is echoed it looks fine. Any ideas? The server im using is wamp server.
-
the following is the code for my homepage (WIP) and the 2nd page which is displayed via get. however when the second page is displayed the ifrst one is displayed under neath and nothing displays on the first page. This is usually solved via a elseif or else which i have included but it still isnt working. <?php include 'includes/header.php'; include 'config/config.php'; # When displaying the list of topics # if (isset($_GET['forum'])) { $forumid = $_GET['forum']; ?> <div id="content_holder"> <table id="forum_table"> <tr> <td id="forum_name">Topic</td> <td id="forum_count">Replies</td> <td id="forum_count">Views</td> <td id="forum_stats">Last Post</td> <?php $sql = mysql_query(" SELECT * FROM $tbl_topics WHERE forum_id = $forumid") or die (mysql_error()); while($row = mysql_fetch_object($sql)) { echo '<tr><td id="forum_name"><p>' . $row->topic_name . '</p><p>' . $row->topic_poster . '</p></td><td id="forum_count"><p>' . $row->topic_replies . '</p></td><td id="forum_count"><p>' . $row->topic_views . '</p></td><td id="forum_stats"><p>'; if (!$row->topic_last_poster) { echo 'No Replies'; } else { echo $row->topic_last_poster . '</p><p>' . date("F j, Y, g:i a", strtotime($row->topic_last_post_time)); } echo '</p></td></tr>'; } ?> </table> </div> <? } else { ?> <!-- When displaying the home page (list of forums) --> <div id="content_holder"> <table id="forum_table"> <tr> <td id="forum_name">Forum</td> <td id="forum_count">Topics</td> <td id="forum_count">Posts</td> <td id="forum_stats">Last Post</td> <?php $sql = mysql_query("SELECT * FROM $tbl_forums") or die (mysql_error()); while($row = mysql_fetch_object($sql)) { echo '<tr><td id="forum_name"><p> <a href="index.php?forum=' . $row->forum_id . '">' . $row->forum_name . '</a></p><p>' . $row->forum_description . '</p></td><td id="forum_count"><p>' . $row->forum_topics . '</p></td><td id="forum_count"><p>' . $row->forum_posts . '</p></td><td id="forum_stats"><p>'; if (!$row->forum_last_poster) { echo 'No Posts'; } else { echo $row->forum_last_poster . '</p><p>' . date("F j, Y, g:i a", strtotime($row->forum_last_post_time)); } echo '</p></td></tr>'; } ?> </table> </div> <?php } ?>
-
hopefully you will be kind enough to add my tables into that code as i have never used joins before. table: forum_posts rows forum_posts.forumid -> the id of the forum so i know which forum the post belongs to forum_posts.postedby -> holds the username
-
help with LIKE code, for a very simple search feature
doddsey_65 replied to therelelogo's topic in MySQL Help
top search if something is like the entered term do "SELECT * FROM table WHERE row LIKE %'".$_POST[search_term']."'%"