Jump to content

ryanfilard

Members
  • Posts

    252
  • Joined

  • Last visited

Everything posted by ryanfilard

  1. I researched it but could not find an answer. http://goo.gl/DhWe7
  2. When the user has more than 7 pages it will say View All Pages
  3. I am planing to make it open source and sell themes for it. Thank you for the feedback.
  4. I have been working on this every once in a while. It is a CMS system I am making. Tell me what you think of it so far. Front: http://sdev.ryanweekly.com:754/elemata Dashboard: (In Development) http://sdev.ryanweekly.com:754/elemata/admin/ User: admin Pass: password
  5. I have a mysql table with the columns ip, date, and page. How would I get the total number of rows with the same ip address. My Table: ip: date: page: 192.168.1.1 1.1.2011 1 192.168.1.1 1.1.2011 2 192.168.1.1 1.1.2011 3 192.168.1.1 1.1.2011 4 192.168.1.1 1.1.2011 3 192.179.1.1 1.1.2011 2 192.179.1.1 1.1.2011 7 192.179.1.1 1.1.2011 1 192.179.1.1 1.1.2011 2 All the IPs that are the same should be grouped together. mysql_num_rows should output 2
  6. How would I open a text file from another server and echo it. http://mysite.com/news/feed.txt
  7. All of a sudden my webpage sidebar moved. What is wrong? http://dl.tl/?ecbc
  8. I really need help with this one.
  9. I am tying to make my category menus mysql based but all my sub categories end up under the last category. Here is my code. <ul class="sf-menu"> <li><a href="http://www.mysite.com/index.php">Home</a></li> <?PHP do { ?> <li><a href="news.php?c=<?PHP echo $row_bodynav['id']; ?>"><?PHP echo $row_bodynav['catname']; ?></a> <?PHP if ($row_bodynav['slug'] == $row_bodynav_sub['parent']) {echo '<ul>'; do { ?><li><a href="news.php?c=<?PHP echo $row_bodynav['id'];?>&sc=<?PHP echo $row_bodynav_sub['id']; ?>"><?PHP echo $row_bodynav_sub['subcatname']; ?></a></li> <?PHP } while ($row_bodynav_sub = mysql_fetch_assoc($bodynav_sub)); echo '</ul>';} ?> </li> <?PHP } while ($row_bodynav = mysql_fetch_assoc($bodynav)); ?> </ul>
  10. I currently am using this <?PHP do { ?> <h1><?PHP echo $texthead; ?></h1> <p><?PHP echo $text; ?></p> <?PHP } while ($row_bodynav = mysql_fetch_assoc($bodynav)); ?> I am not sure how to make it display something different for the first result. It would usually be like this Text Text Text Text But I would like it to do something like this. Text Text Text Text
  11. I am currently trying to make a line graph out of data using php and javascript. How do I add up the values of a column and separate them by month. For example the database has 74 amount of rows. Then the values from the "views" column get added up and then displayed by month. <table width="70%" class="linechart"> <thead> <tr> <td></td> <th scope="col">Jan</th> <th scope="col">Feb</th> <th scope="col">Mar</th> <th scope="col">Apr</th> <th scope="col">May</th> <th scope="col">Jun</th> </tr> </thead> <tbody> <tr> <th scope="row">Post Views</th> <td>24324</td> <td>29634</td> <td>15435</td> <td>56545</td> <td>23543</td> <td>2123</td> </tr> </tbody> </table>
  12. I already have a script that uploads the image but I would like to make a copy of the image resized down by 50% and uploaded to a new folder (imgups/thumbnails) I want it to do this all in one php script. I am not sure how to do this.
  13. What are some tool recommendations
  14. I really need people to give me some feedback.
  15. I have 5TB but I just want testers.
  16. I am testing out a new server and I was wondering if anyone wanted to test it. 500MB Disk Space and 5GB Transfer. I have 15 open spots.
  17. http://dl.tl/?6d04 How do I make it so the first featured posts cycle. (The one with the big picture.)
  18. I found it $news was in the required file. But I still get this Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rweekly/public_html/2012/view_arguments.php on line 37
  19. this is all of my php code <?php require_once('Connections/news.php'); ?> <?php $id = $_REQUEST['id']; if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_news, $news); $query_news = "SELECT * FROM news WHERE id = '$id'"; $news = mysql_query($query_news, $news) or die(mysql_error()); $row_news = mysql_fetch_assoc($news); $totalRows_news = mysql_num_rows($news); mysql_select_db($database_news, $news); $query_arguments = "SELECT * FROM argue WHERE pid = '$id'"; $arguments = mysql_query($query_arguments, $news) or die(mysql_error()); $row_arguments = mysql_fetch_assoc($arguments); $totalRows_arguments = mysql_num_rows($arguments); ?>
  20. What is wrong? Warning: mysql_select_db(): supplied resource is not a valid MySQL-Link resource in /home/rweekly/public_html/2012/view_arguments.php on line 41 Warning: mysql_query(): supplied resource is not a valid MySQL-Link resource in /home/rweekly/public_html/2012/view_arguments.php on line 43 mysql_select_db($database_news, $news); $query_news = "SELECT * FROM news WHERE id = '$id'"; $news = mysql_query($query_news, $news) or die(mysql_error()); $row_news = mysql_fetch_assoc($news); $totalRows_news = mysql_num_rows($news); mysql_select_db($database_news, $news); $query_arguments = "SELECT * FROM argue WHERE pid = '$id'"; $arguments = mysql_query($query_arguments, $news) or die(mysql_error()); $row_arguments = mysql_fetch_assoc($arguments); $totalRows_arguments = mysql_num_rows($arguments);
  21. Do you manage your server with cPanel? To check the current post_max_size is use this in your php file <?PHP phpinfo; ?>
  22. It might be what your post_max_size is set to in your php configuration settings.
  23. This does not work correctly and I need help with it. If $rating is equal to zero it displays 4 stars on this page http://rwdev.whekle.com/view.php?id=4571 what I am doing wrong, it is probably a simple mistake. if($rating <= '1.5'){ $star1 = "yes"; }elseif($rating <= '2.5'){ $star2 = "yes"; }elseif($rating <= '3.5'){ $star3 = "yes"; }elseif($rating <= '4.5'){ $star4 = "yes"; }elseif($rating <= '5.0'){ $star5 = "yes"; }
  24. I used this $query_ratingsys = "UPDATE news SET votes=votes+'$newvote',rating=rating+'$ratingget' WHERE id = '$id'"; [code] It works now thank you.
  25. No here is my form that submits. <form method="post" action="view.php?id=<?PHP echo $_REQUEST['id']; ?>"> <input name="star2" type="radio" class="star" value="1"/> <input name="star2" type="radio" class="star" value="2"/> <input name="star2" type="radio" class="star" value="3"/> <input name="star2" type="radio" class="star" value="4"/> <input name="star2" type="radio" class="star" value="5"/> <input type="hidden" name="formcheck" value="rating"> <input name="rate" type="submit" id="rate" value="Rate"> </form>
×
×
  • 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.