Jump to content

Recommended Posts

There are multiple ways to do this.

 

  • Link to another page with full article
  • Load entire article, truncate the data to a small blurb, and have the rest of the data in a seperate, non-visible div. Use javascript to make it visible when needed.
  • Get truncated data, use AJAX to retrieve full data when wanted.

Link to comment
https://forums.phpfreaks.com/topic/265160-read-more-option/#findComment-1358975
Share on other sites

thanks for reply...

I dont have any code right now, what i wanted is If some one add some blog with blog title n blog info.

I want to display some text of updated blog on home page with "read more" link

In that case, you would just query the data from your database and echo it out like anything else.  Check out the function mysql_query, and using the returned data.  That's assuming you're using mysql of course, else use the alternative.
Link to comment
https://forums.phpfreaks.com/topic/265160-read-more-option/#findComment-1359000
Share on other sites

from the PHP manual:

 

Suggested alternatives

 

Use of this extension is discouraged. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:

 

mysqli_query()

PDO::query()

 

complementary reads:

http://www.php.net/manual/en/mysqlinfo.api.choosing.php

and

http://www.php.net/manual/en/faq.databases.php#faq.databases.mysql.deprecated

Link to comment
https://forums.phpfreaks.com/topic/265160-read-more-option/#findComment-1359002
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.