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>";
?>
need help with date function
i have following form for dateCode: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
PHP code for a proxy
I was wondering which function I could use to create an online proxy tool. I was thinking cURL would work, but it just doesn't seem appropriate, for cURL is mostly used form getting data. Any ideas?
PHP and Javascript
Hello Everyone,I have a page that needs a javascript code to be written between PHP code but the condition is that javascript code should not be executed. How can I prevent javascript code to be
Login Functionality Working Different on IE
This is an odd one, I have a site which has an admin section. The admin pages unsurprisingly require you to be logged in to access them. Each admin page has the following at the top to check that the
switch not getting value
what am i doing wrong?i want to populate the country list according to the categoryi want to switch in case CategoryID=1 and CatID2=2 in the country_list tablethen call on "alpha" to
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
Snapshot from video
anyone knw how to make a snapshot maker from avi n mkv format.for example if i give a direct link (mysite.com/song.avi) then it will give a snapshot in jpg format
Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
Interpret Order
Hello all,I'm wondering if I have this:Code: $switch = array( 'one' => $this->RenderOne() ,'two' => $this->RenderTwo());Would php call the function
Logic question
im wondering what's the best method to do the above list:it is for alliance @ MMORPG game -the administrator of alliance have 10 slots for creating ranks ... each rank have it's own permissions (in