i was wondering how to add a break in a blog post after a certain amount of characters... any idea on how to do this???
this is the code i'm workig with
<?php
$connect = mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("blog", $connect) or die(mysql_error());
echo "<h1>Blog</h1>";
$query = mysql_query("SELECT * FROM blog");
if (mysql_num_rows($query) == 0) {
echo "<hr />There are no posts yet, make the first in the admin section!";
} else {
while ($row = mysql_fetch_assoc($query)) {
echo "<hr />";
$title2 = $row['title'];
$name = $row['name'];
$email = $row['email'];
$post = $row['post'];
$date = $row['date'];
$time = $row['time'];
echo "<h3>Title: " . $title2 . "</h3><table width='100%'><tr><td><b>Posted by: " . $name . "(" . $email . ") at " . $time . " on " . $date . "</b></td></tr><tr><td>" . nl2br(strip_tags($post)) . "</td></tr></table>n";
}
}
echo "<hr />";
$page = $_GET['p'];
if ($page) {
$path = "/inc/" . $page . ".php";
if (file_exists($path)) {
include ($path);
}
}
echo "Are you an admin? <a href='index.php?p=blog&p=credentials'>Place a post</a>";
?>
Relative path
I have a absolute path to an image - like so: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/nigeria/images/uploaded/1/71256119068_51fe7f0fd342377.jpegHow can I get the relative document
generating all possible random letters
hi'how can i randomize the letters a,b,c,d,e all possible ways, and i want to print the resultand unique from each?thanx
need help in php variable
i have a php variable on one pageCode: [Select]$lastId = mysql_insert_id($db);echo $lastId;i want to send this variable and the value in it to second page when i click on submit buttoni already tried
Packet Design
Hi All,Im new about network programming and I want to design a protocol but I have some questions about packet desing. For example I wanna do a sturct to send informations like that ;struct info {
MII Netweaver Server stopped due to CPIC connection Problem
Dear Experts,
Transaction variant for VA02 not working
My requirement is to have transaction for user to only add the output and print a sales order.
Warning: session_start() [function.session-start]: Cann.....
hi, can someone help me with this? I keep getting this error....Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by ......I tried to upload my files
extending tidy
I have problem with type-hinting and extending tidy. This code creates error:Code: class cMyTidy extends tidy{ public $tralala;}$oMyTidy = new cMyTidy();doSomething($oMyTidy);function
'grab_files', multiple extension?
hey guys,can anyone suggest a way to make to following line of code look for files with more than just 'jpg' within the file name (eg 'jpg, JPG, JPEG, jpeg')Code: $files = grab_files('./gallery',
Email "$"
Hello!!Any PHP guy with a bit of a knowledge in Flash ?When I send a JPEG from flash how to get it to email in PHP.