Jump to content

searls03

Members
  • Posts

    907
  • Joined

  • Last visited

Everything posted by searls03

  1. 1 problem, the descending order thing is not working..............: 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 'desc' at line 1
  2. hey richey rich, I am trying to achieve the same thing..........what did you have to do?
  3. Ok I got it now.....I thought bold was going to be some complicated method......nevermind I guess.....thanks.I will post back with questions I f I have em.
  4. Hello, I am looking for an event manager that I can put into my site...............I search on google and cant find anything besides for event sites.........does anyone have any suggestion scripts or searches to help me?
  5. ok, thanks.........wait, how does it know whether to be bold or not and that is the first time I have seen LEFT JOIN, what is that? if you have where it is determining bold, could you quote it to show me? or is it that AS VIEWED in second code?
  6. Sorry if i am getting annoying here, but I am annoyed. I really need some help with this topic...........so please give me some ideas if you have them...............this IS one of the biggest flaws that I cant seem to figure out so I need major help!!!!!!!!!!!!!!!!
  7. can you please help me fix the issue?
  8. ok, so how would I do the second one?
  9. I am almost done with my website and I will use this thread to post small enhancements that would make my website better.........so #1, I have a code that will display news topics, how can I redo this code so that the topics are in reverse order and so that the title will be in bold lettering until it is read? <?php session_start(); // Must start session first thing /* Created By Adam Khoury @ www.flashbuilding.com -----------------------June 20, 2008----------------------- */ // Here we run a login check if (!isset($_SESSION['id'])) { echo 'Please <a href="login.php">log in</a> to access your account'; exit(); } //Connect to the database through our include include_once "connect_to_mysql.php"; // Place Session variable 'id' into local variable $userid = $_SESSION['id']; // Query member data from the database and ready it for display $sql = mysql_query("SELECT * FROM members WHERE userid='$userid' LIMIT 1"); while($row = mysql_fetch_array($sql)){ $name = $row["name"]; $phone = $row["phone"]; $username = $row["username"]; $address = $row["address"]; $city = $row["city"]; $state = $row["state"]; $zip = $row["zip"]; $cell = $row["cell"]; $email = $row["email"]; $accounttype = $row["accounttype"]; $rank = $row["rank"]; $badges = $row["badges"]; } ?> <?php include 'config1.php'; include 'opendb.php'; // if no id is specified, list the available articles if(!isset($_GET['id'])) { $self = $_SERVER['PHP_SELF']; $query = "SELECT id, title FROM news ORDER BY id"; $result = mysql_query($query) or die('Error : ' . mysql_error()); // create the article list $content = '<ol>'; while($row = mysql_fetch_array($result, MYSQL_NUM)) { list($id, $title) = $row; $content .= "<li><a href=\"$self?id=$id\">$title</a></li>\r\n"; } $content .= '</ol>'; $title = 'News'; } else { // get the article info from database $query = "SELECT title, content FROM news WHERE id=".$_GET['id']; $result = mysql_query($query) or die('Error : ' . mysql_error()); $row = mysql_fetch_array($result, MYSQL_ASSOC); $title = $row['title']; $content = $row['content']; } include 'closedb.php'; ?> <table width="600" border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#336699"> <tr> <td bgcolor="#FFFFFF"> <h1 align="center"><?php echo $title; ?></h1> <?php echo $content; // when displaying an article show a link // to see the article list if(isset($_GET['id'])) { ?> <p> </p> <p align="center"><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Back to News</a></p> <?php } ?> so once this topic is resolved.......I will probably post another small topic to look at.
  10. ok so where would I put what from my query?
  11. OK, so I have a code that will display the current month and next two months...... <table width="410" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="339" bgcolor="#999999" scope="col">EVENTS</td> </tr> <tr> <td class="afasd"><?php echo date("F",strtotime("-0 month")); ?></td> </tr> <tr> <td><?php echo $as; ?></td> </tr> <tr> <td class="adfaf"><?php echo date("F",strtotime("+1 month")); ?></td> </tr> <tr> <td><?php echo $as; ?></td> </tr> <tr> <td class="jasdfjs"><?php echo date("F",strtotime("+2 month")); ?></td> </tr> <tr> <td><?php echo $as; ?></td> </tr> </table> Where $as is the event name and the following: $as .= "<p><a href=\"viewevent.php?eventid=$eventid\">$startdate - $enddate --- $event</a></p>\r\n"; I need to know how I can make the march events display under march, april under april, march and april under march and april or an all year event to display for all year.........does this make sense.......... I really need this working as this is the last of about 3 things I need for my website to be working properly....................................but I need to have mysql know whether if the months are between the start date and end date....... otherwise should i try to make check boxes in the event creation page that will have each month and then it will be able to have a specific month(s) in database to see whether it should display.......the only problem with this is how I could do this for multiple months.........PLEASE PLEASE PLEASE GIVE me some ideas......
  12. any ideas? is there a way for mysql to know the dates between both of those dates?
  13. btw, this is what does the posting: <?php session_start(); // Must start session first thing /* Created By Adam Khoury @ [url=http://'http://www.flashbuilding.com/']www.flashbuilding.com[/url] -----------------------June 20, 2008----------------------- */ // Here we run a login check if (!isset($_SESSION['id'])) { echo 'Please <a href="login.php">log in</a> to access your account'; exit(); } //Connect to the database through our include include_once "connect_to_mysql.php"; // Place Session variable 'id' into local variable $userid = $_SESSION['id']; // Query member data from the database and ready it for display $sql = mysql_query("SELECT * FROM members WHERE userid='$userid' limit 1"); while($row = mysql_fetch_array($sql)){ $userid = $row['userid']; } // Process the form if it is submitted if ($_POST['rank']) { $badges = $_POST['badges']; $rank = $_POST['rank']; $sql = mysql_query("UPDATE members SET badges='$badges', rank='$rank', userid='$userid'"); printf("Records updated: %d\n", mysql_affected_rows()) ; exit(); } // close if post ?>
  14. oh, sorry, I had it copied and everything...... <form method="post" action="scoutmanager.php"> <input type="hidden" name="submitted" value="true" ?/> <table width="896" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="127" bgcolor="#F7E496" class="adfd" scope="col"><strong>Property</strong></td> <td width="181" bgcolor="#F7E496" scope="col"><strong>Value</strong></td> <td width="588" bgcolor="#F7E496" scope="col"> </td> </tr> <tr> <td bgcolor="#F7E496"><select name="category"> <option value="name">Name</option> <option value="address">Address</option> <option value="phone">Phone Number</option> <option value="username">Username</option> </select></td> <td bgcolor="#F7E496"><input type="text" name ="criteria" /></td> <td bgcolor="#F7E496"><input type="submit" /></td> </tr> <tr> <td bgcolor="#F7E496"> </td> <td bgcolor="#F7E496"> </td> <td bgcolor="#F7E496"> </td> </tr> <tr> <td bgcolor="#F7E496"> </td> <td bgcolor="#F7E496"> </td> <td bgcolor="#F7E496"> </td> </tr> </table> </form> <?php if (isset($_POST['submitted'])) { include('connect1.php'); $category = $_POST['category']; $criteria = $_POST['criteria'] ; $query = "SELECT * FROM members WHERE $category LIKE '%".$criteria."%'"; $result = mysqli_query($dbcon, $query) or die('error getting data'); $num_rows = mysqli_num_rows($result); echo "$num_rows results found"; echo "<table width=\"896\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; echo "<tr bgcolor=\"#F7E496\"><td bgcolor=\"#F7E496\"><strong>ID</strong></td> <td bgcolor=\"#F7E496\"><strong>Merit Badges</strong></td> <td bgcolor=\"#F7E496\"><strong></strong></td><td bgclor=\"#F7E496\"></td></tr>"; while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo "<form action=\"scout.php\" method=\"post\"> <p> <input name=\"badges\" id=\"badges\" type=\"text\" value=\" $badges\"/> <span class=\"adfa\"> <br /> (enter a ,[comma] then [space] then merit badge name) </span> </p> <label for=\"rank\"></label> <select name=\"rank\" id=\"rank\"> <option value=\"Scout\">Scout</option> <option value=\"Tenderfoot\">Tenderfoot</option> <option value=\"Second Class Scout\">Second Class Scout</option> <option value=\"First Class Scout\">First Class Scout</option> <option value=\"Star Scout\">Star Scout</option> <option value=\"Life Scout\">Life Scout</option> <option value=\"Eagle Scout\">Eagle Scout</option> <option value=\"\" selected=\"selected\">$rank></option> </select>" ; echo "<hr />"; echo "</td></tr>"; echo "<input type=\"hidden\" name=\"userid\" id=\"userid\">"; echo "<input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Save\" /> </p>"; echo "</form>"; } echo "</table>"; } ?>
  15. ok, so here is what displays the search results..........I also need to know how to make this one form with one submit button show up.............it keeps on associating it with my id........can you help me associate it with the right id?
  16. ok, I know how to extract data from database, so how do I make it so that each result is with specific id?
  17. ok, so if I get rid of it posting username in the update field, it works fine...........if not, it doesn't, how can I fix this.......
  18. yeah, just a little bit, I am trying to start from beginning and trace my steps to see what i did wrong unless you see it.
  19. thank you........I will tell you when I do.....
  20. OK so if it is not going to be able to decrypt it........how do I make a box where they have to type in old password and it has to match so then they can type new password......key here is that the old password must have matched.....
  21. look, I am sorry alright.....I don't have a code for it right now.....that is sorta what I was hoping to get some help on............I am in the finishing stages of the website and this is one of the last things I need to get working...........so I am hoping someone can help me come up with a code that could get me STARTED......and I could hopefully go from there.......
  22. That is actually what I basically need help with...........cause it is going to grab my userid I am sure and I need it not to do 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.