Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function string_limit_words($string, $word_limit) {
- $words = explode(' ', $string);
- echo $string;
- print_r($words);
- return implode(' ', array_slice($words, 0, $word_limit));
- }
- $blog='';
- if($_SERVER["REQUEST_METHOD"] == "POST")
- {
- $title=mysql_real_escape_string($_POST['title']);
- $body=mysql_real_escape_string($_POST['body']);
- $title=htmlentities($title);
- $body=htmlentities($body);
- $date=date("Y/m/d");
- $newtitle=string_limit_words($title, 6);
- $urltitle=preg_replace('/[^a-z0-9]/i',' ', $newtitle);
- $newurltitle=str_replace(" ","-",$newtitle);
- $url=$date.'/'.$newurltitle.'.html';
- $datetag = "seo";
- $tag=$date.'/'.$newurltitle.'.html';
- $tag = '/'.$newurltitle.'.html';
- mysql_query("insert into blog(title,body,url,taglist) values('$title','$body','$url','$datetag')");
- //$blogurl="http://demos.9lessons.info/seo/$url";
- $blogurl="$url";
- <h2>listtag pag<a href="taglist/<?php echo $datetag; ?>?page=2"> taglist.php/<?php echo $datetag; ?> tag list</a></h2>
- echo $_GET['datetag'];
- $_GET['datetag']; and $_GET[page];
- http://localhost/nwr/seo/seo/taglist/seo?page=2
- echo $_GET['datetag'];
- $_GET[page];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement