Minggu, 01 September 2013

PHP Indonesia - Facebook: mohon bantuanya gan... waktu input, format teks b...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Design-Led Engineering

Sourcebits - When your Mobile App has to be absolutely developed right. We've built more than 20 apps that have cracked the Top 10 in the App Store.
From our sponsors
mohon bantuanya gan... waktu input, format teks b...
Sep 2nd 2013, 04:07, by Hadi AJa

Hadi AJa 4:07am Sep 2
mohon bantuanya gan...

waktu input, format teks bagus seperti ketikan pada umumnya, terpisah tiap paragram, saya cek di database mysql juga normal, tapi waktu di panggil dari web tulisanya jadi nyambung terus tanpa alinea/paragrap kayak kereta api, dimana salahnya ya gan, coding yang di pakai untuk tampil data adalah seperti berikut:

<?php
mysql_connect('localhost','root','root');
mysql_select_db('data');

if (isset($_GET['id'])) {
$id = $_GET['id'];
} else {
die ("Error. No Id Selected! ");
}

$query = "SELECT id, title, judul, headline, isi, penulis FROM artikel WHERE id ='$id'";
$hasil = mysql_query($query);
while ($data = mysql_fetch_array($hasil))
{
?>
<font size=4 color=dark orange><strong><?php echo $data['judul']; ?></strong></font>
<br><?php echo $data['penulis']; ?></br>
<a href="view.php?id=<?php echo $data['id']; ?>"><br><img style="float:left; margin:5px;" src="thumbnail2.php?id=<?php echo $data['id']; ?>"></a>
<a><?php echo $data['isi']; ?></a><br />
<a href="index.php?id=<?php echo $data['id']; ?>"> << Kembali</a><br /><hr />

<?php

}

?>

Slamet Aprilianto 4:16am Sep 2
Enternya pake <br> bukan \r\n (enter yg di keyboard)

Aris Gates 4:16am Sep 2
saat dipanggil gunakan nl2br(stripslashes()) saat input gunakan addslashes()

Hadi AJa 4:45am Sep 2
jadi dibagian mana yang harus di rubah boss.. sorry newbie

Aris Gates 4:48am Sep 2
dibagian ini tambahkan <?php echo nl2br(stripslashes($data['isi'])); ?> tapi sebelumnya dibagian inputnya tambahkan addslashes()

Hadi AJa 4:54am Sep 2
ok gan makasih atas bantuanya, sudah bisa sekarang

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar