maat Posted January 5, 2010 Share Posted January 5, 2010 Hello, I need some help, or at least a little nudge in the right direction. I am about to write some code, and I'm not sure how to do a couple things in particular. I'm creating a blog, and am about to write the script that will display the posts. This main display, blog_main.php, will only show a short preview of each post. By clicking on the title, or the links at the bottom of the post (Read More or View/Add Comments), visitors will be able to see the entire post, and view/add comments. I want to use a single file to control the display of this second page. I am not sure how to a) display a shortened version of the posts, and b) pass variables through the link to the second page. I'm new to php, so I'm not even sure if I'm asking the right questions! Any tips, hints, or suggestions are highly appreciated! Kindest regards, Maat Link to comment https://forums.phpfreaks.com/topic/187316-two-vexing-questions/ Share on other sites More sharing options...
teamatomic Posted January 5, 2010 Share Posted January 5, 2010 $short_post=substr($post,0,150);// this will give you the first 150 characters use a GET domain.com?post=$post HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/187316-two-vexing-questions/#findComment-989164 Share on other sites More sharing options...
maat Posted January 6, 2010 Author Share Posted January 6, 2010 I thank you profusely! Here is a sloppy kiss (with a little extra!) -- Maat Link to comment https://forums.phpfreaks.com/topic/187316-two-vexing-questions/#findComment-989381 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.