Jump to content

ronoc_php

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ronoc_php's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So on my site i have a latest tweet section, Instead of the section coming up once its appearing twice, below is the code any help would be great : ) Thanks <div id="projectnewsrss"> <h3>LATEST TWEETS</h3> <?php $rss1 = fetch_feed("http://pipes.yahoo.com/pipes/pipe.run?_id=e3ec8c711bfd1ee1e13e5b483fb37786&_render=rss"); if (!is_wp_error( $rss1 ) ) : $maxitems1 = $rss1->get_item_quantity(10); $rss_items1 = $rss1->get_items(0, $maxitems1); endif; ?> <ul> <?php if ($maxitems1 == 0) echo '<li>There is currently no new tweets.</li>'; else foreach ( $rss_items1 as $item1 ) : ?> <li> <a href='<?php echo esc_url( $item1->get_permalink() ); ?>' title='<?php echo 'Posted '.$item1->get_date('j F Y | g:i a'); ?>'> <?php echo esc_html( $item1->get_title() ); ?></a> <span class="newsdate"><?php echo $item1->get_date('j F Y')?></span> </li> <?php endforeach; ?> </ul> </div> <?php endwhile; ?>
  2. Thanks for getting back, sorry to ask, But what do u mean if i am storing the username next to the posts. What i did was make a table named posts and another called members any user that is signing up is given an id number, as far as errors its fine i'm doing this as part as an assignment for college, there not expecting alot!!
  3. So basically anyone that logs in can only see there own post and nobody else, So other users should not see any other comments bare there own.
  4. Hey i am doing a login and blog system i have done the login and reg part but i am having troubles with the adding post. Basically at the moment my user can make a post and they can anyone can view it, but i need to the user only be able to create there own prv post and that when anybody else logs in they cant make a post under it. Does anyone have any ideas? this is my code for the posts <?php session_start(); include('db_connect.php'); ?> Welcome to the fear blog <a href="logout.php">log out</a><hr/> <?php $sql = mysql_query("SELECT * FROM posts ORDER BY id "); while($row = mysql_fetch_array($sql)){ $title = $row['title']; $content = $row['content']; $category = $row['category']; ?> <div id="post"> <div id="wrapper"> <div id="title"> <label>Title</label> <?php echo $title; ?> </div> <div id="category"><label>category</label> <?php echo $category; ?> </div> <div id="content"> <label>Content</label><?php echo $content; ?> </div> </div> <?php } ?> <div id="contents"> <form action="post.php" method="post"> <label> Title:</label><input type="text" name="title" /><br/> <label> Category:</label><input type="text" name="category" /><br /> <label> Content:</label><textarea name="content"></textarea><br/> <input type="submit" name="submit" value="Post"/> </form> </div> </div> </div> </div>
×
×
  • 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.